tock
Module Contents
alltypes
Module Contents
data class AccountLinking
enum class AccountLinkingStatus
class AccountLinkingWebhook : Webhook
abstract class Action : Event
data class ActionMetadata
enum class ActionNotificationType
enum class ActionPriority
data class ActionReport
data class ActionRequest
enum class ActionVisibility
class AlexaConnector : ConnectorBase
data class AlexaConnectorCallback : ConnectorCallbackBase, SpeechletV2
@ConnectorHandler("alexa") @Target([AnnotationTarget.CLASS]) annotation class AlexaHandler
data class AlexaInputMessage : ConnectorMessage
data class AlexaMessage : ConnectorMessage
open class AlexaTockMapper
Module Contents
AlexaTockMapper(applicationId: String)
open fun alexaEntityToTockEntity(request: IntentRequest, intent: String, slot: String, botDefinition: BotDefinition): Entity?
open fun alexaEntityToTockEntityValue(request: IntentRequest, intent: String, slot: Slot, botDefinition: BotDefinition, index: Int): NlpEntityValue
open fun alexaIntentToTockIntent(request: IntentRequest, botDefinition: BotDefinition): String
val applicationId: String
open fun getSlots(request: IntentRequest): Map<String, Slot>?
open fun toEndSessionEvent(requestEnvelope: SpeechletRequestEnvelope<SessionEndedRequest>): EndSessionEvent
open fun toEvent(userId: String, request: IntentRequest, botDefinition: BotDefinition): Event
open fun toStartSessionEvent(requestEnvelope: SpeechletRequestEnvelope<SessionStartedRequest>): StartSessionEvent
abstract class AnswerConfiguration
enum class AnswerConfigurationType
data class AnyValueWrapper
data class ApplicationDialogFlowData
enum class AppRole
data class AppRolesWebhook : Webhook
data class ArchivedEntityValue
data class ArtifactVersion
data class Attachment
data class Attachment
data class Attachment : Message
data class AttachmentConfiguration : MessageConfiguration
data class AttachmentField
class AttachmentMessage : Message
data class AttachmentRequest
enum class AttachmentType
enum class AttachmentType
class BadRequestException : RestException
interface BotAnswerInterceptor
data class BotApplicationConfiguration
Module Contents
BotApplicationConfiguration(applicationId: String, botId: String, namespace: String, nlpModel: String, connectorType: ConnectorType, ownerConnectorType: ConnectorType? = null, name: String = applicationId, baseUrl: String? = defaultBaseUrl, parameters: Map<String, String> = emptyMap(), path: String? = null, _id: Id<BotApplicationConfiguration> = newId())
val _id: Id<BotApplicationConfiguration>
val applicationId: String
val baseUrl: String?
val botId: String
val connectorType: ConnectorType
val defaultBaseUrl: String
val name: String
val namespace: String
val nlpModel: String
val ownerConnectorType: ConnectorType?
val parameters: Map<String, String>
val path: String?
val targetConnectorType: ConnectorType
fun toConnectorConfiguration(): ConnectorConfiguration
interface BotApplicationConfigurationDAO
interface BotBus : I18nTranslator
Module Contents
abstract val action: Action
abstract val applicationId: String
open fun booleanChoice(key: ParameterKey): Boolean
abstract val botDefinition: BotDefinition
abstract val botId: PlayerId
open fun changeContextValue(name: String, value: Any?): Unit
open fun changeContextValue(key: ParameterKey, value: Any?): Unit
open fun changeEntityText(entity: Entity, textContent: String?): Unit
open fun changeEntityValue(role: String, newValue: EntityValue?): Unit
open fun changeEntityValue(entity: Entity, newValue: Value?): Unit
open fun changeEntityValue(entity: Entity, newValue: EntityValue): Unit
open fun changeEntityValue(entity: Entity, textContent: String): Unit
open fun choice(key: ParameterKey): String?
abstract val connectorData: ConnectorData
open val contextId: String?
open fun <T : Any> contextValue(name: String): T?
open fun <T : Any> contextValue(key: ParameterKey): T?
abstract val currentAnswerIndex: Int
abstract val dialog: Dialog
open fun end(delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
open fun end(i18nText: CharSequence, delay: Long = botDefinition.defaultDelay(currentAnswerIndex), vararg i18nArgs: Any?): BotBus
open fun end(i18nText: CharSequence, vararg i18nArgs: Any?): BotBus
open fun end(message: Message, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
abstract fun end(action: Action, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
open fun end(messages: MessagesList, initialDelay: Long = 0): BotBus
open fun end(delay: Long = botDefinition.defaultDelay(currentAnswerIndex), messageProvider: BotBus.() -> Any?): BotBus
open fun endRawText(plainText: CharSequence?, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
abstract val entities: Map<String, EntityStateValue>
open fun entityText(entity: Entity): String?
open fun entityText(role: String): String?
open fun <T : Value> entityValue(role: String, valueTransformer: (EntityValue) -> T? = @Suppress("UNCHECKED_CAST") { it.value as? T? }): T?
open fun <T : Value> entityValue(entity: Entity, valueTransformer: (EntityValue) -> T? = @Suppress("UNCHECKED_CAST") { it.value as? T? }): T?
open fun entityValueDetails(entity: Entity): EntityValue?
open fun entityValueDetails(role: String): EntityValue?
abstract fun <T> getBusContextValue(name: String): T?
open fun <T> getBusContextValue(key: ParameterKey): T?
open fun handleAndSwitchStory(storyDefinition: StoryDefinition): Unit
open fun hasActionEntity(role: String): Boolean
open fun hasActionEntity(entity: Entity): Boolean
open fun hasChoiceValue(param: ParameterKey, value: ParameterKey): Boolean
open fun i18n(defaultLabel: CharSequence, args: List<Any?>): I18nLabelValue
open fun i18nKey(key: String, defaultLabel: CharSequence, vararg args: Any?): I18nLabelValue
abstract var i18nProvider: I18nKeyProvider
abstract val intent: IntentAware?
open fun isChoiceAction(): Boolean
open fun isFeatureEnabled(feature: FeatureType, default: Boolean = false): Boolean
open fun isIntent(intentOwner: IntentAware): Boolean
abstract fun markAsUnknown(): Unit
abstract var nextUserActionState: NextUserActionState?
open fun nlpStats(): NlpCallStats?
abstract fun reloadProfile(): Unit
open fun removeAllEntityValues(): Unit
open fun removeEntityValue(role: String): Unit
open fun removeEntityValue(entity: Entity): Unit
open fun resetDialogState(): Unit
fun retrieveCurrentBus(): BotBus?
open fun send(i18nText: CharSequence, delay: Long = botDefinition.defaultDelay(currentAnswerIndex), vararg i18nArgs: Any?): BotBus
open fun send(i18nText: CharSequence, vararg i18nArgs: Any?): BotBus
open fun send(delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
open fun send(delay: Long = botDefinition.defaultDelay(currentAnswerIndex), messageProvider: BotBus.() -> Any?): BotBus
open fun send(message: Message, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
open fun send(messages: MessagesList, initialDelay: Long = 0): BotBus
abstract fun send(action: Action, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
abstract fun sendRawText(plainText: CharSequence?, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
abstract fun setBusContextValue(key: String, value: Any?): Unit
open fun setBusContextValue(key: ParameterKey, value: Any?): Unit
open fun skipAnswer(): Unit
open var step: StoryStep<out StoryHandlerDefinition>?
abstract var story: Story
open fun switchStory(storyDefinition: StoryDefinition): Unit
abstract val targetConnectorType: ConnectorType
abstract val userId: PlayerId
abstract val userInterfaceType: UserInterfaceType
abstract val userLocale: Locale
abstract val userPreferences: UserPreferences
open val userText: String?
abstract val userTimeline: UserTimeline
open fun withMessage(message: ConnectorMessage): BotBus
abstract fun withMessage(connectorType: ConnectorType, messageProvider: () -> ConnectorMessage): BotBus
abstract fun withNotificationType(notificationType: ActionNotificationType): BotBus
abstract fun withPriority(priority: ActionPriority): BotBus
abstract fun withVisibility(visibility: ActionVisibility): BotBus
open class BotBusMock : BotBus
Module Contents
BotBusMock(context: BotBusMockContext, action: Action = context.firstAction)
open val action: Action
fun addActionEntity(contextValue: EntityValue): BotBusMock
fun addActionEntity(entity: Entity, newValue: Value?): BotBusMock
fun addActionEntity(entity: Entity, textContent: String): BotBusMock
val answers: List<BotBusMockLog>
open val applicationId: String
fun applyBotAnswerInterceptor(a: Action): Action
open var botDefinition: BotDefinition
open val botId: PlayerId
val busAnswers: List<BotBusMockLog>
fun checkEndCalled(): BotBusMock
open var connectorData: ConnectorData
var connectorType: ConnectorType
val context: BotBusMockContext
fun createBotSentence(plainText: CharSequence?): SendSentence
open val currentAnswerIndex: Int
open var dialog: Dialog
open fun end(action: Action, delay: Long): BotBus
open val entities: Map<String, EntityStateValue>
val firstAnswer: BotBusMockLog
val firstBusAnswer: BotBusMockLog
open fun <T> getBusContextValue(name: String): T?
open var i18nProvider: I18nKeyProvider
open var intent: IntentAware?
val lastAnswer: BotBusMockLog
val lastBusAnswer: BotBusMockLog
open fun markAsUnknown(): Unit
open var nextUserActionState: NextUserActionState?
open fun reloadProfile(): Unit
fun run(): BotBusMock
val secondAnswer: BotBusMockLog
val secondBusAnswer: BotBusMockLog
open fun send(action: Action, delay: Long): BotBus
open fun sendAction(action: Action, delay: Long): Unit
open fun sendRawText(plainText: CharSequence?, delay: Long): BotBus
open fun setBusContextValue(key: String, value: Any?): Unit
open var story: Story
open var targetConnectorType: ConnectorType
val thirdAnswer: BotBusMockLog
val thirdBusAnswer: BotBusMockLog
open fun translate(key: I18nLabelValue?): CharSequence
val translator: TranslatorEngine
open val userId: PlayerId
open var userInterfaceType: UserInterfaceType
open val userLocale: Locale
open val userPreferences: UserPreferences
open var userTimeline: UserTimeline
open fun withMessage(connectorType: ConnectorType, messageProvider: () -> ConnectorMessage): BotBus
open fun withNotificationType(notificationType: ActionNotificationType): BotBus
open fun withPriority(priority: ActionPriority): BotBus
open fun withVisibility(visibility: ActionVisibility): BotBus
data class BotBusMockContext
Module Contents
BotBusMockContext(applicationId: String, userId: PlayerId, botId: PlayerId, botDefinition: BotDefinition, storyDefinition: StoryDefinition, action: Action = SendSentence(userId, applicationId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(), connectorType: ConnectorType = defaultTestConnectorType, testContext: TestContext = currentTestContext)
BotBusMockContext(botDefinition: BotDefinition, storyDefinition: StoryDefinition, applicationId: String = botDefinition.botId, userId: PlayerId = PlayerId("user"), botId: PlayerId = PlayerId("bot", PlayerType.bot), action: Action = SendSentence(userId, applicationId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(), connectorType: ConnectorType = defaultTestConnectorType, testContext: TestContext = currentTestContext)
BotBusMockContext(userTimeline: UserTimeline, dialog: Dialog, story: Story, firstAction: Action, botDefinition: BotDefinition, i18nProvider: I18nKeyProvider, userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, connectorType: ConnectorType = defaultTestConnectorType, testContext: TestContext = currentTestContext, snapshots: MutableList<Snapshot> = mutableListOf())
val answers: List<BotBusMockLog>
val applicationId: String
var botDefinition: BotDefinition
val botId: PlayerId
fun choice(intentName: String, vararg parameters: Pair<String, String>): SendChoice
fun choice(intentName: String, step: StoryStep<out StoryHandlerDefinition>, vararg parameters: Pair<String, String>): SendChoice
fun choice(intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>, parameters: Parameters): SendChoice
fun choice(intent: IntentAware, parameters: Parameters = Parameters()): SendChoice
fun choiceOfId(choiceId: String): SendChoice
var connectorType: ConnectorType
var dialog: Dialog
var firstAction: Action
val firstAnswer: BotBusMockLog
var i18nProvider: I18nKeyProvider
val initialUserPreferences: UserPreferences
val lastAnswer: BotBusMockLog
fun resetUserPreferences(userPreferences: UserPreferences): Unit
val secondAnswer: BotBusMockLog
fun sentence(text: String, vararg entityValues: EntityValue): SendSentence
fun sentence(text: String, entityValues: List<EntityValue> = emptyList()): SendSentence
fun sentence(text: String, intent: IntentAware? = null, vararg entityValues: EntityValue): SendSentence
fun sentence(text: String, intent: IntentAware? = null, entityValues: List<EntityValue> = emptyList()): SendSentence
fun sentence(message: ConnectorMessage, vararg entityValues: EntityValue): SendSentence
fun sentence(message: ConnectorMessage, entityValues: List<EntityValue> = emptyList()): SendSentence
fun sentence(message: ConnectorMessage, intent: IntentAware? = null, vararg entityValues: EntityValue): SendSentence
fun sentence(message: ConnectorMessage, intent: IntentAware? = null, entityValues: List<EntityValue> = emptyList()): SendSentence
val snapshots: MutableList<Snapshot>
var story: Story
val testContext: TestContext
val thirdAnswer: BotBusMockLog
val userId: PlayerId
var userInterfaceType: UserInterfaceType
val userPreferences: UserPreferences
var userTimeline: UserTimeline
data class BotBusMockLog
interface BotDefinition : I18nKeyProvider
Module Contents
abstract val botDisabledStory: StoryDefinition?
open val botEnabledListener: (Action) -> Unit
abstract val botEnabledStory: StoryDefinition?
abstract val botId: String
var defaultBreath: Long
open fun defaultDelay(answerIndex: Int): Long
abstract val defaultUnknownAnswer: I18nLabelValue
open fun entity(name: String, role: String? = null): Entity
open fun errorAction(playerId: PlayerId, applicationId: String, recipientId: PlayerId): Action
abstract val eventListener: EventListener
open fun findIntent(intent: String): Intent
fun findIntent(stories: List<StoryDefinition>, intent: String): Intent
open fun findStoryDefinition(intent: IntentAware?): StoryDefinition
open fun findStoryDefinition(intent: String?): StoryDefinition
fun findStoryDefinition(stories: List<StoryDefinition>, intent: String?, unknownStory: StoryDefinition, keywordStory: StoryDefinition): StoryDefinition
open val flowDefinition: DialogFlowDefinition?
abstract val goodbyeStory: StoryDefinition?
abstract val handleAttachmentStory: StoryDefinition?
abstract val helloStory: StoryDefinition?
open fun i18n(defaultLabel: CharSequence, args: List<Any?>): I18nLabelValue
open fun i18nTranslator(userLocale: Locale, connectorType: ConnectorType, userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, contextId: String? = null): I18nTranslator
open fun isBotDisabledIntent(intent: Intent?): Boolean
open fun isBotEnabledIntent(intent: Intent?): Boolean
abstract val keywordStory: StoryDefinition
abstract val namespace: String
abstract val nlpModelName: String
abstract val noInputStory: StoryDefinition?
abstract val stories: List<StoryDefinition>
open val testBehaviour: TestBehaviour
abstract val unknownStory: StoryDefinition
abstract val userLocationStory: StoryDefinition?
open class BotDefinitionBase : BotDefinition
Module Contents
BotDefinitionBase(botId: String, stories: Array<out StoryDefinition>)
BotDefinitionBase(botId: String, namespace: String, stories: List<StoryDefinition>, nlpModelName: String = botId, unknownStory: StoryDefinition = defaultUnknownStory, helloStory: StoryDefinition? = null, goodbyeStory: StoryDefinition? = null, noInputStory: StoryDefinition? = null, botDisabledStory: StoryDefinition? = null, botEnabledStory: StoryDefinition? = null, userLocationStory: StoryDefinition? = null, handleAttachmentStory: StoryDefinition? = null, eventListener: EventListener = EventListenerBase(), keywordStory: StoryDefinition = defaultKeywordStory, flowDefinition: DialogFlowDefinition? = null)
open val botDisabledStory: StoryDefinition?
open val botEnabledStory: StoryDefinition?
open val botId: String
val defaultKeywordStory: SimpleStoryDefinition
open val defaultUnknownAnswer: I18nLabelValue
val defaultUnknownStory: SimpleStoryDefinition
fun deleteKeywordHandler(bus: BotBus, sendEnd: Boolean = true): Unit
fun endTestContextKeywordHandler(bus: BotBus, sendEnd: Boolean = true): Unit
open val eventListener: EventListener
open val flowDefinition: DialogFlowDefinition?
fun getKeyword(bus: BotBus): String?
open val goodbyeStory: StoryDefinition?
open val handleAttachmentStory: StoryDefinition?
open val helloStory: StoryDefinition?
open val keywordStory: StoryDefinition
open val namespace: String
open val nlpModelName: String
open val noInputStory: StoryDefinition?
open val stories: List<StoryDefinition>
fun testContextKeywordHandler(bus: BotBus, sendEnd: Boolean = true): Unit
open fun toString(): String
open val unknownStory: StoryDefinition
open val userLocationStory: StoryDefinition?
object BotIoc
interface BotProvider
open class BotProviderBase : BotProvider
object BotRepository
data class BotVersion
data class BuiltInAnswerConfiguration : AnswerConfiguration
object BuiltInKeywordListener : NlpListener
abstract class Button : UserAction
data class Button
data class ButtonPayload : ModelPayload
enum class ButtonType
data class CallbackEvent : EventApiMessage
data class CallbackRequest
data class CallButton : Button
data class Choice : Message
Module Contents
Choice(intentName: String, step: StoryStep<out StoryHandlerDefinition>, parameters: Map<String, String> = emptyMap(), delay: Long = 0)
Choice(intentName: String, parameters: Map<String, String> = emptyMap(), delay: Long = 0)
val delay: Long
val eventType: EventType
val intentName: String
fun isSimpleMessage(): Boolean
val parameters: Map<String, String>
fun toAction(playerId: PlayerId, applicationId: String, recipientId: PlayerId): Action
fun toPrettyString(): String
data class ChoiceConfiguration : MessageConfiguration
com.fasterxml.jackson.core.JsonParser
com.fasterxml.jackson.databind.module.SimpleModule
Module Contents
fun <T : Any> SimpleModule.addDeserializer(type: KClass<T>, deser: JsonDeserializer<out T>): SimpleModule!
fun <T : Any> SimpleModule.addSerializer(type: KClass<T>, ser: JsonSerializer<in T>): SimpleModule!
com.github.salomonbrys.kodein.KodeinInjector
com.mongodb.reactivestreams.client.MongoCollection
Module Contents
inline fun <reified T : Any> MongoCollection<T>.watch(fullDocument: FullDocument = FullDocument.DEFAULT, noinline listener: (ChangeStreamDocument<T>) -> Unit): Unit
open class ConfigurableStoryHandler<out T : StoryHandlerDefinition> : StoryHandlerBase<T>
interface Connector
Module Contents
open fun addSuggestions(text: CharSequence, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
open fun addSuggestions(message: ConnectorMessage, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
abstract val connectorType: ConnectorType
open fun loadProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences?
open fun notify(controller: ConnectorController, recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap()): Unit
open fun refreshProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences?
abstract fun register(controller: ConnectorController): Unit
abstract fun send(event: Event, callback: ConnectorCallback, delayInMs: Long = 0): Unit
open fun toConnectorMessage(message: MediaMessage): BotBus.() -> List<ConnectorMessage>
open fun unregister(controller: ConnectorController): Unit
abstract class ConnectorBase : Connector
interface ConnectorCallback
open class ConnectorCallbackBase : ConnectorCallback
data class ConnectorConfiguration
Module Contents
ConnectorConfiguration(connectorId: String, path: String, type: ConnectorType, applicationName: String, baseUrl: String?, ownerConnectorType: ConnectorType? = null, parameters: Map<String, String> = emptyMap())
ConnectorConfiguration(connectorId: String, path: String, type: ConnectorType, ownerConnectorType: ConnectorType? = null, parameters: Map<String, String> = emptyMap())
val connectorId: String
fun getBaseUrl(): String
fun getName(): String
val ownerConnectorType: ConnectorType?
val parameters: Map<String, String>
val path: String
val type: ConnectorType
interface ConnectorController
Module Contents
abstract val botDefinition: BotDefinition
abstract val connector: Connector
open val connectorType: ConnectorType
open fun errorMessage(playerId: PlayerId, applicationId: String, recipientId: PlayerId): Action
abstract fun handle(event: Event, data: ConnectorData = ConnectorData(ConnectorCallbackBase(event.applicationId, connector.connectorType))): Unit
open fun notify(recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap()): Unit
abstract fun registerServices(serviceIdentifier: String, installer: (Router) -> Unit): Unit
abstract fun support(action: Action, data: ConnectorData = ConnectorData(ConnectorCallbackBase(action.applicationId, connector.connectorType))): Double
abstract fun unregisterServices(): Unit
open class ConnectorData
typealias ConnectorDef<T> = ConnectorStoryHandlerBase<T>
class ConnectorException : Exception
@Target([AnnotationTarget.ANNOTATION_CLASS]) annotation class ConnectorHandler
interface ConnectorMessage
interface ConnectorProvider
interface ConnectorStoryHandler<out T : StoryHandlerDefinition> : BotBus
abstract class ConnectorStoryHandlerBase<out T : StoryHandlerDefinition> : BotBus, ConnectorStoryHandler<T>
data class ConnectorType
data class ConnectorTypeConfiguration
data class ConnectorTypeConfigurationField
class ContinuePublicConversationInPrivateEvent : OneToOneEvent
data class CustomEvent
data class CustomEventRequest
Module Contents
CustomEventRequest(customEvent: CustomEvent, pageId: String, pageScopedUserId: String, event: String = "CUSTOM_APP_EVENTS", advertiserTrackingEnabled: Short = 0, applicationTrackingEnabled: Short = 1, extinfo: String = mapper.writeValueAsString(listOf("mb1")))
CustomEventRequest(customEvents: List<CustomEvent>, pageId: String, pageScopedUserId: String, event: String = "CUSTOM_APP_EVENTS", advertiserTrackingEnabled: Short = 0, applicationTrackingEnabled: Short = 1, extinfo: String = mapper.writeValueAsString(listOf("mb1")))
val advertiserTrackingEnabled: Short
val applicationTrackingEnabled: Short
val customEvents: List<CustomEvent>
val event: String
val extinfo: String
val pageId: String
val pageScopedUserId: String
data class Dialog
data class DialogExecutionReport
interface DialogFlowDAO
data class DialogFlowDefinition
data class DialogFlowState
data class DialogFlowStateData
data class DialogFlowStateTransition
data class DialogFlowStateTransitionData
enum class DialogFlowStateTransitionType
data class DialogReport
interface DialogReportDAO
data class DialogReportQuery
Module Contents
DialogReportQuery(namespace: String, nlpModel: String, language: Locale? = null, start: Long = 0, size: Int = 1, playerId: PlayerId? = null, text: String? = null, dialogId: String? = null, intentName: String? = null, exactMatch: Boolean = false, from: ZonedDateTime? = null, to: ZonedDateTime? = null, connectorType: ConnectorType? = null, displayTests: Boolean = false)
val connectorType: ConnectorType?
val dialogId: String?
val displayTests: Boolean
val exactMatch: Boolean
val from: ZonedDateTime?
val intentName: String?
val language: Locale?
val namespace: String
val nlpModel: String
val playerId: PlayerId?
val size: Int
val start: Long
val text: String?
val to: ZonedDateTime?
data class DialogReportQueryResult
data class DialogState
Module Contents
DialogState(currentIntent: Intent? = null, entityValues: MutableMap<String, EntityStateValue> = mutableMapOf(), context: MutableMap<String, Any> = mutableMapOf(), userLocation: UserLocation? = null, nextActionState: NextUserActionState? = null)
fun changeValue(entity: Entity, newValue: Value?): Unit
fun changeValue(newValue: EntityValue): Unit
fun changeValue(role: String, newValue: EntityValue?): Unit
fun cleanupState(): Unit
val context: MutableMap<String, Any>
var currentIntent: Intent?
val entityValues: MutableMap<String, EntityStateValue>
fun initFromDialogState(dialog: DialogState): DialogState
var nextActionState: NextUserActionState?
fun resetAllEntityValues(): Unit
fun resetState(): Unit
fun resetValue(role: String): Unit
fun setContextValue(name: String, value: Any?): Unit
fun setValue(role: String, value: EntityValue): Unit
fun setValue(entity: Entity, value: Value): Unit
var userLocation: UserLocation?
object Dice
data class Element
class EndConversationEvent : OneToOneEvent
class EndSessionEvent : Event
data class EntityStateValue
data class EntityValue
Module Contents
EntityValue(nlpResult: NlpResult, value: NlpEntityValue)
EntityValue(sentence: String, value: NlpEntityValue)
EntityValue(entity: Entity, value: Value?, content: String? = null)
EntityValue(start: Int?, end: Int?, entity: Entity, content: String?, value: Value? = null, evaluated: Boolean = false, subEntities: List<EntityValue> = emptyList(), probability: Double = 1.0, mergeSupport: Boolean = false)
val content: String?
val end: Int?
val entity: Entity
val evaluated: Boolean
val mergeSupport: Boolean
val probability: Double
val start: Int?
val subEntities: List<EntityValue>
fun toString(): String
val value: Value?
data class Entry
abstract class Event
abstract class EventApiMessage : SlackConnectorMessage
interface EventListener
open class EventListenerBase : EventListener
data class EventState
enum class EventType
interface Executor
data class FacebookLocation
interface FeatureDAO
Module Contents
open fun addFeature(botId: String, namespace: String, enabled: Boolean, type: FeatureType): Unit
abstract fun addFeature(botId: String, namespace: String, enabled: Boolean, category: String, name: String): Unit
open fun deleteFeature(botId: String, namespace: String, type: FeatureType): Unit
abstract fun deleteFeature(botId: String, namespace: String, category: String, name: String): Unit
abstract fun disable(botId: String, namespace: String, category: String, name: String): Unit
open fun disable(botId: String, namespace: String, type: FeatureType): Unit
abstract fun enable(botId: String, namespace: String, category: String, name: String): Unit
open fun enable(botId: String, namespace: String, type: FeatureType): Unit
abstract fun getFeatures(botId: String, namespace: String): List<FeatureState>
open fun isEnabled(botId: String, namespace: String, type: FeatureType, default: Boolean = false): Boolean
abstract fun isEnabled(botId: String, namespace: String, category: String, name: String, default: Boolean = false): Boolean
data class FeatureState
interface FeatureType
fr.vsct.tock.nlp.api.client.model.Entity
data class GAAction
data class GAActionProvidedPaymentOptions
enum class GAActionType
data class GAArgument
enum class GAArgumentBuiltInName
abstract class GAArgumentValue
enum class GAArgumentValueType
data class GABasicCard
data class GAButton
data class GACancellationInfo
data class GACapability
enum class GACardNetwork
data class GACarouselItem
data class GACarouselSelect
data class GACart
class GAConnector : ConnectorBase
data class GAConversation
enum class GAConversationType
data class GACustomerInfo
data class GACustomerInfoOptions
enum class GACustomerInfoProperty
data class GACustomPushMessage
data class GADate
data class GADateTime
data class GADevice
data class GAExpectedInput
data class GAExpectedIntent
data class GAFinalResponse
data class GAFulfillmentInfo
data class GAGoogleProvidedPaymentInstrument
data class GAGoogleProvidedPaymentOptions
@ConnectorHandler("ga") @Target([AnnotationTarget.CLASS]) annotation class GAHandler
enum class GAHoldStatus
data class GAHoldValue : GAArgumentValue
data class GAImage
data class GAInput
data class GAInputPrompt
enum class GAInputType
abstract class GAInputValueData
enum class GAInputValueDataType
enum class GAIntent
data class GAInTransitInfo
data class GAItem
data class GALatLng
data class GALineItem
enum class GALineItemType
data class GALineItemUpdate
data class GALinkOutSuggestion
data class GAListItem
data class GAListSelect
data class GALocation
data class GAMerchant
data class GAMoney
data class GAOpenUrlAction
data class GAOptionInfo
data class GAOptionValueSpec : GAInputValueData
data class GAOrder
data class GAOrderOptions
data class GAOrderState
data class GAOrderUpdate
Module Contents
GAOrderUpdate(googleOrderId: String, actionOrderId: String, orderState: GAOrderState, orderManagementActions: List<GAAction>, receipt: GAReceipt, updateTime: String, totalPrice: GAPrice? = null, lineItemUpdates: Map<String, GALineItemUpdate>, userNotification: GAUserNotification? = null, infoExtension: String? = null, rejectionInfo: GARejectionInfo? = null, cancellationInfo: GACancellationInfo? = null, inTransitInfo: GAInTransitInfo? = null, fulfillmentInfo: GAFulfillmentInfo? = null, returnInfo: GAReturnInfo? = null)
val actionOrderId: String
val cancellationInfo: GACancellationInfo?
val fulfillmentInfo: GAFulfillmentInfo?
val googleOrderId: String
val infoExtension: String?
val inTransitInfo: GAInTransitInfo?
val lineItemUpdates: Map<String, GALineItemUpdate>
val orderManagementActions: List<GAAction>
val orderState: GAOrderState
val receipt: GAReceipt
val rejectionInfo: GARejectionInfo?
val returnInfo: GAReturnInfo?
val totalPrice: GAPrice?
val updateTime: String
val userNotification: GAUserNotification?
data class GAPaymentInfo
data class GAPaymentMethodTokenizationParameters
enum class GAPaymentMethodTokenizationType
data class GAPaymentOptions
enum class GAPaymentType
enum class GaPaymentType
enum class GAPermission
data class GAPermissionValueSpec : GAInputValueData
data class GAPostalAddress
Module Contents
GAPostalAddress(revision: Double, regionCode: String, languageCode: String?, postalCode: String?, sortingCode: String?, administrativeArea: String?, locality: String?, sublocality: String?, addressLines: List<String>, recipients: List<String>?, organization: String?)
val addressLines: List<String>
val administrativeArea: String?
val languageCode: String?
val locality: String?
val organization: String?
val postalCode: String?
val recipients: List<String>?
val regionCode: String
val revision: Double
val sortingCode: String?
val sublocality: String?
data class GAPrice
enum class GAPriceType
data class GAProposedOrder
data class GARawInput
enum class GAReasonType
data class GAReceipt
data class GARejectionInfo
data class GARequest
data class GARequestConnectorMessage : ConnectorMessage
data class GAResponse
data class GAResponseConnectorMessage : ConnectorMessage
data class GAResponseMetadata
enum class GAResultType
data class GAReturnInfo
data class GARichResponse
data class GASelectItem
enum class GASignInStatus
data class GASignInValue : GAArgumentValue
data class GASimpleResponse
data class GASimpleSelect
enum class GAState
data class GAStatus
enum class GAStatusCode
data class GAStatusDetail
data class GAStructuredResponse
data class GASubLine
data class GASuggestion
data class GASurface
data class GATimeOfDay
data class GATransactionDecisionCheckResult
data class GATransactionDecisionValue : GAArgumentValue
data class GATransactionDecisionValueSpec : GAInputValueData
data class GATransactionRequirementsCheckResult : GAArgumentValue
data class GATransactionRequirementsCheckSpec : GAInputValueData
enum class GATransactionUserDecision
data class GAUser
data class GAUserNotification
data class GAUserProfile
data class GenericElement
data class GenericMessage
Module Contents
GenericMessage(connectorMessage: ConnectorMessage, attachments: List<Attachment> = emptyList(), choices: List<Choice> = emptyList(), texts: Map<String, String> = emptyMap(), locations: List<Location> = emptyList(), metadata: Map<String, String> = emptyMap(), subElements: List<GenericElement> = emptyList())
GenericMessage(connectorType: ConnectorType = ConnectorType.none, attachments: List<Attachment> = emptyList(), choices: List<Choice> = emptyList(), texts: Map<String, String> = emptyMap(), locations: List<Location> = emptyList(), metadata: Map<String, String> = emptyMap(), subElements: List<GenericElement> = emptyList(), connectorMessage: ConnectorMessage? = null)
val attachments: List<Attachment>
val choices: List<Choice>
val connectorType: ConnectorType
val locations: List<Location>
val metadata: Map<String, String>
val subElements: List<GenericElement>
val texts: Map<String, String>
data class GenericPayload : ModelPayload
class GetAppRolesEvent : Event
typealias Handler<T> = StoryHandlerBase<T>
typealias HandlerDef<T> = StoryHandlerDefinitionBase<T>
interface I18nTranslator : I18nKeyProvider
data class Intent : IntentAware
interface IntentAware
interface IntentAwareBase : IntentAware
typealias IntentDef = IntentAwareBase
data class InteractiveMessageEvent : EventApiMessage
io.vertx.core.Vertx
io.vertx.ext.web.Route
abstract class JacksonDeserializer<T> : JsonDeserializer<T>
java.util.Enumeration
class JWKHandler
kotlin.collections.Iterable
kotlin.collections.Iterator
kotlin.String
enum class Level
enum class ListElementStyle
data class ListPayload : ModelPayload
object Loader
data class Location : Message
data class LocationConfiguration : MessageConfiguration
data class LocationPayload : Payload
class LocationQuickReply : QuickReply
data class LoginButton : Button
class LoginEvent : OneToOneEvent
interface LoginMicrosoftOnline
data class LoginResponse
class LogoutButton : Button
class LogoutEvent : OneToOneEvent
class MarkSeenEvent : Event
data class MediaAction : MediaMessage
data class MediaActionDescriptor : MediaMessageDescriptor
data class MediaCard : MediaMessage
data class MediaCardDescriptor : MediaMessageDescriptor
data class MediaElement
data class MediaFile
data class MediaFileDescriptor
interface MediaMessage
interface MediaMessageDescriptor
enum class MediaMessageType
data class MediaPayload : ModelPayload
enum class MediaType
abstract class Message : MessengerConnectorMessage
open class Message
interface Message
data class MessageAnswerConfiguration : AnswerConfiguration
interface MessageConfiguration
data class MessageEcho : Message
data class MessageEchoWebhook : Webhook
data class MessageEvent
object MessageParser
data class MessageRequest
data class MessagesList
enum class MessageTag
data class MessageWebhook : Webhook
enum class MessagingType
typealias MessengerAttachmentType = AttachmentType
class MessengerConnector : ConnectorBase
Module Contents
fun addSuggestions(text: CharSequence, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
fun addSuggestions(message: ConnectorMessage, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
val applicationId: String
val appToken: String
fun getConnectorByPageId(pageId: String): MessengerConnector?
fun getSecondaryReceivers(): List<SecondaryReceiverData>?
fun getThreadOwner(userId: PlayerId): String?
fun healthcheck(): Boolean
fun loadProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences
fun notify(controller: ConnectorController, recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, parameters: Map<String, String>): Unit
val pageId: String
fun passThreadControl(userId: PlayerId, metadata: String? = null): SendResponse?
val path: String
fun refreshProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences?
fun register(controller: ConnectorController): Unit
fun requestThreadControl(userId: PlayerId, metadata: String? = null): SendResponse?
fun send(event: Event, callback: ConnectorCallback, delayInMs: Long): Unit
fun sendCustomEvent(applicationId: String, customEventRequest: CustomEventRequest): Unit
fun sendCustomEvent(customEventRequest: CustomEventRequest): Unit
fun sendEvent(event: Event, transformMessageRequest: (MessageRequest) -> MessageRequest = { it }, postMessage: (String) -> Unit = {}, transformActionRequest: (ActionRequest) -> ActionRequest = { it }): SendResponse?
fun sendOptInEvent(event: Event): Unit
fun sendSimpleEvent(event: Event, transformActionRequest: (ActionRequest) -> ActionRequest = { it }): SendResponse?
fun takeThreadControl(userId: PlayerId, metadata: String? = null): SendResponse?
fun toConnectorMessage(message: MediaMessage): BotBus.() -> List<ConnectorMessage>
val token: String
fun unregister(controller: ConnectorController): Unit
val verifyToken: String?
class MessengerConnectorCallback : ConnectorCallbackBase
abstract class MessengerConnectorMessage : ConnectorMessage
@ConnectorHandler("messenger") @Target([AnnotationTarget.CLASS]) annotation class MessengerHandler
data class MicrosoftOpenidMetadata
data class MicrosoftValidSigningKey : Serializable
data class MicrosoftValidSigningKeys : Serializable
abstract class ModelPayload : Payload
mu.KLogger
mu.KLogger
data class NextUserActionState
data class NlpCallStats
interface NlpController
data class NlpEntityMergeContext
data class NlpIntentStat
interface NlpListener
Module Contents
open fun error(query: NlpQuery, throwable: Throwable?): Unit
open fun evaluateEntities(userTimeline: UserTimeline, dialog: Dialog, event: Event, nlpResult: NlpResult): List<EntityValue>
open fun findIntent(userTimeline: UserTimeline, dialog: Dialog, event: Event, nlpResult: NlpResult): IntentAware?
open fun handleKeyword(sentence: String): Intent?
open fun mergeEntityValues(dialogState: DialogState, action: Action, entityToMerge: NlpEntityMergeContext): NlpEntityMergeContext
open fun sortEntitiesToMerge(entities: List<NlpEntityMergeContext>): List<NlpEntityMergeContext>
open fun success(query: NlpQuery, result: NlpResult): Unit
class NoInputEvent : OneToOneEvent
class NoMessageException : Exception
class NotFoundException : RestException
enum class NotificationType
interface ObfuscatorService
abstract class OneToOneEvent : Event
data class Optin
data class OptinWebhook : Webhook
interface ParameterKey
interface ParameterObfuscator
data class Parameters
data class PassThreadControl
class PassThreadControlEvent : OneToOneEvent
data class PassThreadControlRequest
data class PassThreadControlWebhook : Webhook
abstract class Payload
abstract class Payload
enum class PayloadType
data class PlayerId
enum class PlayerType
data class PostbackButton : Button
data class PostbackWebhook : Webhook
data class PriorMessage
abstract class QuickReply : UserAction
enum class QuickReplyContentType
data class Recipient
interface RequestFilter
data class RequestThreadControl
class RequestThreadControlEvent : OneToOneEvent
data class RequestThreadControlRequest
data class RequestThreadControlWebhook : Webhook
interface RequestTimer
open class RequestTimerData
open class RestException : Exception
retrofit2.Retrofit
retrofit2.Retrofit.Builder
data class ScriptAnswerConfiguration : AnswerConfiguration
class ScriptAnswerVersionedConfiguration
data class SecondaryReceiverData
data class SecondaryReceiverResponse
class SendAttachment : Action
class SendChoice : Action
Module Contents
SendChoice(playerId: PlayerId, applicationId: String, recipientId: PlayerId, intentName: String, step: StoryStep<out StoryHandlerDefinition>?, parameters: Map<String, String> = emptyMap(), id: Id<Action> = newId(), date: Instant = Instant.now(), state: EventState = EventState(), metadata: ActionMetadata = ActionMetadata())
SendChoice(playerId: PlayerId, applicationId: String, recipientId: PlayerId, intentName: String, parameters: Map<String, String> = emptyMap(), id: Id<Action> = newId(), date: Instant = Instant.now(), state: EventState = EventState(), metadata: ActionMetadata = ActionMetadata())
fun decodeChoiceId(id: String): Pair<String, Map<String, String>>
fun encodeChoiceId(bus: BotBus, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap()): String
fun encodeChoiceId(intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap(), busStep: StoryStep<out StoryHandlerDefinition>? = null, currentIntent: Intent? = null): String
fun encodeNlpChoiceId(nlp: String): String
const val EXIT_INTENT: String
const val IMAGE_PARAMETER: String
val intentName: String
const val LOGIN_INTENT: String
const val LOGOUT_INTENT: String
const val NLP: String
fun obfuscate(mode: StringObfuscatorMode, playerId: PlayerId): Event
val parameters: Map<String, String>
const val PHONE_CALL_INTENT: String
const val PREVIOUS_INTENT_PARAMETER: String
fun step(): String?
const val STEP_PARAMETER: String
const val TITLE_PARAMETER: String
fun toEncodedId(): String
fun toMessage(): Message
fun toString(): String
const val URL_PARAMETER: String
data class Sender
enum class SenderAction
class SendLocation : Action
data class SendResponse
data class SendResponseError
data class SendResponseErrorContainer
open class SendSentence : Action
Module Contents
SendSentence(playerId: PlayerId, applicationId: String, recipientId: PlayerId, text: CharSequence?, messages: MutableList<ConnectorMessage> = mutableListOf(), id: Id<Action> = newId(), date: Instant = Instant.now(), state: EventState = EventState(), metadata: ActionMetadata = ActionMetadata(), nlpStats: NlpCallStats? = null, precomputedNlp: NlpResult? = null)
fun changeConnectorMessage(message: ConnectorMessage): SendSentence
fun hasEmptyText(): Boolean
fun hasMessage(type: ConnectorType): Boolean
fun message(type: ConnectorType): ConnectorMessage?
open val messages: MutableList<ConnectorMessage>
open var nlpStats: NlpCallStats?
open fun obfuscate(mode: StringObfuscatorMode, playerId: PlayerId): Event
val precomputedNlp: NlpResult?
val stringText: String?
val text: CharSequence?
open fun toMessage(): Message
open fun toString(): String
data class Sentence : Message
data class SentenceConfiguration : MessageConfiguration
typealias SentenceElement = GenericMessage
data class SentenceElementConfiguration
Module Contents
SentenceElementConfiguration(connectorType: ConnectorType = ConnectorType.none, attachments: List<AttachmentConfiguration> = emptyList(), choices: List<ChoiceConfiguration> = emptyList(), texts: Map<String, I18nLabelValue> = emptyMap(), locations: List<LocationConfiguration> = emptyList(), metadata: Map<String, String> = emptyMap(), subElements: List<SentenceSubElementConfiguration> = emptyList(), connectorMessage: ConnectorMessage? = null)
val attachments: List<AttachmentConfiguration>
val choices: List<ChoiceConfiguration>
val connectorType: ConnectorType
val locations: List<LocationConfiguration>
val metadata: Map<String, String>
val subElements: List<SentenceSubElementConfiguration>
val texts: Map<String, I18nLabelValue>
typealias SentenceSubElement = GenericElement
data class SentenceSubElementConfiguration
data class SimpleAnswer
data class SimpleAnswerConfiguration : AnswerConfiguration
class SimpleBotDefinition : BotDefinitionBase
Module Contents
SimpleBotDefinition(botId: String, namespace: String, stories: List<StoryDefinition>, nlpModelName: String = botId, unknownStory: StoryDefinition = BotDefinitionBase.defaultUnknownStory, helloStory: StoryDefinition? = null, goodbyeStory: StoryDefinition? = null, noInputStory: StoryDefinition? = null, botDisabledStory: StoryDefinition? = null, botEnabledStory: StoryDefinition? = null, userLocationStory: StoryDefinition? = null, handleAttachmentStory: StoryDefinition? = null, eventListener: EventListener = EventListenerBase(), keywordStory: StoryDefinition = BotDefinitionBase.defaultKeywordStory, conversation: DialogFlowDefinition? = null)
typealias SimpleHandler = SimpleStoryHandlerBase
data class SimpleObfuscator : StringObfuscator
open class SimpleStoryDefinition : StoryDefinition
Module Contents
SimpleStoryDefinition(id: String, storyHandler: StoryHandler, steps: Array<out StoryStep<StoryHandlerDefinition>> = emptyArray(), starterIntents: Set<IntentAware>, intents: Set<IntentAware> = starterIntents, unsupportedUserInterfaces: Set<UserInterfaceType> = emptySet())
SimpleStoryDefinition(id: String, storyHandler: StoryHandler, starterIntents: Set<Intent>, intents: Set<Intent> = starterIntents, steps: Set<StoryStep<StoryHandlerDefinition>> = emptySet(), unsupportedUserInterfaces: Set<UserInterfaceType> = emptySet())
open val id: String
open val intents: Set<Intent>
open val starterIntents: Set<Intent>
open val steps: Set<StoryStep<StoryHandlerDefinition>>
open val storyHandler: StoryHandler
open val unsupportedUserInterfaces: Set<UserInterfaceType>
abstract class SimpleStoryHandlerBase : StoryHandlerBase<StoryHandlerDefinition>
interface SimpleStoryStep : StoryStep<StoryHandlerDefinition>
object SlackClient
class SlackConnector : ConnectorBase
abstract class SlackConnectorMessage : ConnectorMessage
enum class SlackEmoji
@ConnectorHandler("slack") @Target([AnnotationTarget.CLASS]) annotation class SlackHandler
data class SlackMessageAttachment
data class SlackMessageIn : SlackConnectorMessage
data class SlackMessageOut : SlackConnectorMessage
data class SlackUser
data class Snapshot
class StartConversationEvent : OneToOneEvent
class StartSessionEvent : Event
data class Story
interface StoryDefinition : IntentAware
open class StoryDefinitionBase : StoryDefinition
data class StoryDefinitionConfiguration : StoryDefinitionAnswersContainer
Module Contents
StoryDefinitionConfiguration(storyId: String, botId: String, intent: Intent, currentType: AnswerConfigurationType, answers: List<AnswerConfiguration>, version: Int = 0, namespace: String = defaultNamespace, mandatoryEntities: List<StoryDefinitionConfigurationMandatoryEntity> = emptyList(), steps: List<StoryDefinitionConfigurationStep> = emptyList(), name: String = storyId, category: String = "default", description: String = "", userSentence: String = "", _id: Id<StoryDefinitionConfiguration> = newId())
val _id: Id<StoryDefinitionConfiguration>
val answers: List<AnswerConfiguration>
val botId: String
val category: String
val currentType: AnswerConfigurationType
val description: String
fun findNextSteps(story: StoryDefinitionConfiguration): List<String>
val intent: Intent
val mandatoryEntities: List<StoryDefinitionConfigurationMandatoryEntity>
val name: String
val namespace: String
val steps: List<StoryDefinitionConfigurationStep>
val storyId: String
val userSentence: String
val version: Int
interface StoryDefinitionConfigurationDAO
data class StoryDefinitionConfigurationFlowNode
data class StoryDefinitionConfigurationMandatoryEntity : StoryDefinitionAnswersContainer
data class StoryDefinitionConfigurationStep : StoryDefinitionAnswersContainer
interface StoryDefinitionExtended : StoryDefinition
interface StoryHandler
abstract class StoryHandlerBase<out T : StoryHandlerDefinition> : StoryHandler, I18nKeyProvider, IntentAware
interface StoryHandlerDefinition : BotBus
abstract class StoryHandlerDefinitionBase<T : ConnectorStoryHandlerBase<*>> : BotBus, StoryHandlerDefinition
interface StoryHandlerListener
interface StoryStep<T : StoryHandlerDefinition>
interface StringObfuscator
enum class StringObfuscatorMode
interface SttListener
object SttService
class SubscribingEvent : OneToOneEvent
data class TakeThreadControl
class TakeThreadControlEvent : OneToOneEvent
data class TakeThreadControlRequest
data class TakeThreadControlWebhook : Webhook
abstract class TeamsBotMessage : ConnectorMessage
class TeamsBotTextMessage : TeamsBotMessage
class TeamsCardAction : TeamsBotMessage
class TeamsConnectorCallback : ConnectorCallbackBase
@ConnectorHandler("teams") @Target([AnnotationTarget.CLASS]) annotation class TeamsHandler
class TeamsHeroCard : TeamsBotMessage
data class TestActionReport
Module Contents
TestActionReport(playerId: PlayerId, date: Instant, message: Message, connectorType: ConnectorType?, userInterfaceType: UserInterfaceType, id: Id<Action> = newId())
TestActionReport(report: ActionReport)
TestActionReport(playerId: PlayerId, date: Instant, messages: List<Message>, connectorType: ConnectorType?, userInterfaceType: UserInterfaceType = textChat, id: Id<Action>)
val connectorType: ConnectorType?
val date: Instant
fun findFirstMessage(): Message
val id: Id<Action>
val messages: List<Message>
val playerId: PlayerId
val userInterfaceType: UserInterfaceType
interface TestBehaviour
open class TestBehaviourBase : TestBehaviour
interface TestClientService
open class TestContext
data class TestDialogReport
open class TestLifecycle<out T : TestContext>
data class TestPlan
interface TestPlanDAO
data class TestPlanExecution
class TextMessage : Message
data class TextQuickReply : QuickReply
data class ThreadControlRequest
data class ThreadOwner
data class ThreadOwnerData
data class ThreadOwnerResponse
@Target([AnnotationTarget.CLASS]) annotation class ThreadSafe
data class TimeBoxedFlag
interface TockAuthProvider : AuthProvider
open class TockJUnit4Rule<out T : TestContext>
Module Contents
TockJUnit4Rule(botDefinition: BotDefinition, lifecycle: TestLifecycle<T> = TestLifecycle(TestContext() as T))
open fun apply(base: <ERROR CLASS>, description: <ERROR CLASS>): <ERROR CLASS>
val botDefinition: BotDefinition
fun busMock(): BotBusMock
val lifecycle: TestLifecycle<T>
fun newBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
fun newBusMockContext(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMockContext
fun startBusMock(): BotBusMock
fun startNewBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
val testContext: T
open class TockJUnit5Extension : TockJUnit5ExtensionBase<TestContext>
open class TockJUnit5ExtensionBase<out T : TestContext>
Module Contents
TockJUnit5ExtensionBase(botDefinition: BotDefinition, lifecycle: TestLifecycle<T> = TestLifecycle(TestContext() as T))
open fun afterEach(p0: <ERROR CLASS>): Unit
open fun beforeEach(p0: <ERROR CLASS>): Unit
val botDefinition: BotDefinition
fun busMock(): BotBusMock
val lifecycle: TestLifecycle<T>
fun newBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
fun newBusMockContext(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), action: Action = SendSentence(userId, botDefinition.botId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(locale = locale)): BotBusMockContext
fun newChoiceRequest(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), parameters: Parameters, connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), tests: BotBusMock.() -> Unit): Unit
fun newRequest(text: String = "", intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), vararg entities: EntityValue, connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), tests: BotBusMock.() -> Unit): Unit
fun newRequest(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), actionProvider: () -> Action, tests: BotBusMock.() -> Unit): Unit
fun send(text: String = "", intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), vararg entities: EntityValue, connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), metadata: ActionMetadata = ActionMetadata(), tests: BotBusMock.() -> Unit): Unit
fun send(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), actionProvider: () -> Action, tests: BotBusMock.() -> Unit): Unit
fun sendChoice(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), parameters: Parameters = Parameters(), connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), tests: BotBusMock.() -> Unit): Unit
fun startBusMock(): BotBusMock
fun startNewBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
val testContext: T
object TockObfuscatorService
data class TockUser : AbstractUser
enum class TockUserRole
class TokenHandler
class TypingOffEvent : Event
class TypingOnEvent : Event
class UnauthorizedException : RestException
object UploadedFilesService
data class UrlButton : Button
data class UrlPayload : Payload
data class UrlPayload : Payload
data class UrlVerificationEvent : EventApiMessage
interface UserAction
data class UserActionPayload
data class UserLocation
interface UserLock
data class UserPreferences
data class UserProfile
data class UserReport
interface UserReportDAO
data class UserReportQuery
Module Contents
UserReportQuery(namespace: String, nlpModel: String, language: Locale, start: Long = 0, size: Int = 1, name: String? = null, from: ZonedDateTime? = null, to: ZonedDateTime? = null, flags: Map<String, String?> = emptyMap(), displayTests: Boolean = false)
val displayTests: Boolean
val flags: Map<String, String?>
val from: ZonedDateTime?
val language: Locale
val name: String?
val namespace: String
val nlpModel: String
val size: Int
val start: Long
val to: ZonedDateTime?
data class UserReportQueryResult
data class UserState
class UserTimeline
interface UserTimelineDAO
abstract class Webhook : MessengerConnectorMessage
abstract class WebVerticle : AbstractVerticle
Module Contents
WebVerticle()
fun addAuth(authProvider: TockAuthProvider = defaultAuthProvider(), pathsToProtect: Set<String> = protectedPaths().map { "$it/*" }.toSet()): Unit
protected open fun addDevCorsHandler(): Unit
open val authenticatePath: String
protected open fun authProvider(): TockAuthProvider?
fun badRequest(message: String): Nothing
open val basePath: String
protected fun blocking(method: HttpMethod, path: String, role: TockUserRole? = defaultRole(), basePath: String = rootPath, handler: (RoutingContext) -> Unit): Unit
protected fun blockingDelete(path: String, role: TockUserRole? = defaultRole(), handler: (RoutingContext) -> Unit): Unit
protected fun blockingGet(path: String, role: TockUserRole? = defaultRole(), basePath: String = rootPath, handler: (RoutingContext) -> String): Unit
protected fun blockingJsonDelete(path: String, role: TockUserRole? = defaultRole(), handler: (RoutingContext) -> Boolean): Unit
protected fun <O> blockingJsonGet(path: String, role: TockUserRole? = defaultRole(), handler: (RoutingContext) -> O): Unit
protected inline fun <reified I : Any, O> blockingJsonPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, I) -> O): Unit
protected inline fun <reified I : Any, O> blockingJsonPut(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, I) -> O): Unit
protected fun blockingPost(path: String, role: TockUserRole? = defaultRole(), handler: (RoutingContext) -> Unit): Unit
protected inline fun <O> blockingUploadBinaryPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, Pair<String, ByteArray>) -> O): Unit
protected inline fun <reified F : Any, O> blockingUploadJsonPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, F) -> O): Unit
protected inline fun <O> blockingUploadPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, String) -> O): Unit
protected inline fun <reified I : Any, O> blockingWithBodyJson(method: HttpMethod, path: String, role: TockUserRole?, crossinline handler: (RoutingContext, I) -> O): Unit
protected fun bodyHandler(): BodyHandler
abstract fun configure(): Unit
protected fun corsHandler(origin: String = "*", allowCredentials: Boolean = false, allowedMethods: Set<HttpMethod> = EnumSet.of(GET, POST, PUT, DELETE), allowedHeaders: Set<String> = listOfNotNull(
"X-Requested-With",
"Access-Control-Allow-Origin",
if (allowCredentials) "Authorization" else null,
"Content-Type"
).toSet()): CorsHandler
protected open fun defaultAuthProvider(): TockAuthProvider
protected open fun defaultRole(): TockUserRole?
fun RoutingContext.endJson(success: Boolean): Unit
fun RoutingContext.endJson(result: Any?): Unit
fun HttpServerResponse.endJson(result: Any?): Unit
protected fun RoutingContext.executeBlocking(handler: (RoutingContext) -> Unit): Unit
fun RoutingContext.firstQueryParam(name: String): String?
abstract fun healthcheck(): (RoutingContext) -> Unit
open val healthcheckPath: String?
fun RoutingContext.isAuthorized(role: TockUserRole, resultHandler: (AsyncResult<Boolean>) -> Unit): Any
protected inline fun <reified I : Any, O> jsonPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, I, Handler<O>) -> Unit): Unit
protected open val logger: KLogger
open val logoutPath: String
fun notFound(): Nothing
val RoutingContext.organization: String
fun RoutingContext.path(name: String): String
fun <T> RoutingContext.pathId(name: String): Id<T>
fun RoutingContext.pathToLocale(name: String): Locale
protected open fun protectedPath(): String
protected open fun protectedPaths(): Set<String>
fun <T> RoutingContext.queryId(name: String): Id<T>?
fun readBytes(upload: FileUpload): ByteArray
inline fun <reified T : Any> RoutingContext.readJson(): T
inline fun <reified T : Any> readJson(upload: FileUpload): T
fun readString(upload: FileUpload): String
protected fun register(method: HttpMethod, path: String, role: TockUserRole? = defaultRole(), basePath: String = rootPath, handler: (RoutingContext) -> Unit): Unit
protected open val rootPath: String
val router: Router
protected val server: HttpServer
open fun start(startFuture: Future<Void>): Unit
protected open fun startServer(startFuture: Future<Void>): Unit
open fun stop(stopFuture: Future<Void>?): Unit
fun RoutingContext.success(): Unit
fun unauthorized(): Nothing
protected fun verticleBooleanProperty(propertyName: String, defaultValue: Boolean): Boolean
protected fun verticleIntProperty(propertyName: String, defaultValue: Int): Int
protected fun verticleLongProperty(propertyName: String, defaultValue: Long): Long
protected fun verticleProperty(propertyName: String, defaultValue: String): String
protected inline fun <reified I : Any, O> withBodyJson(method: HttpMethod, path: String, role: TockUserRole?, crossinline handler: (RoutingContext, I, Handler<O>) -> Unit): Unit
data class WhatsAppAttachment
data class WhatsAppBotAttachment
data class WhatsAppBotImageMessage : WhatsAppBotMessage
abstract class WhatsAppBotMessage : ConnectorMessage
enum class WhatsAppBotMessageType
enum class WhatsAppBotRecipientType
data class WhatsAppBotTextMessage : WhatsAppBotMessage
class WhatsAppConnector : ConnectorBase
class WhatsAppConnectorCallback : ConnectorCallbackBase
data class WhatsAppContact
data class WhatsAppContext
data class WhatsAppDocumentMessage : WhatsAppMessage
data class WhatsAppError
@ConnectorHandler("whatsapp") @Target([AnnotationTarget.CLASS]) annotation class WhatsAppHandler
data class WhatsAppImageMessage : WhatsAppMessage
data class WhatsAppLocation
data class WhatsAppLocationMessage : WhatsAppMessage
abstract class WhatsAppMessage
data class WhatsAppMessageRef
data class WhatsAppMessages : ConnectorMessage
enum class WhatsAppMessageStatus
enum class WhatsAppMessageType
data class WhatsAppProfile
data class WhatsAppResponse
data class WhatsAppStatus
data class WhatsAppSystemMessage : WhatsAppMessage
data class WhatsAppTextBody
data class WhatsAppTextMessage : WhatsAppMessage
data class WhatsAppUnknownMessage : WhatsAppMessage
data class WhatsAppVoiceMessage : WhatsAppMessage
package fr.vsct.tock.bot
package fr.vsct.tock.bot.admin.answer
package fr.vsct.tock.bot.admin.bot
Module Contents
data class ArtifactVersion
data class BotApplicationConfiguration
Module Contents
BotApplicationConfiguration(applicationId: String, botId: String, namespace: String, nlpModel: String, connectorType: ConnectorType, ownerConnectorType: ConnectorType? = null, name: String = applicationId, baseUrl: String? = defaultBaseUrl, parameters: Map<String, String> = emptyMap(), path: String? = null, _id: Id<BotApplicationConfiguration> = newId())
val _id: Id<BotApplicationConfiguration>
val applicationId: String
val baseUrl: String?
val botId: String
val connectorType: ConnectorType
val defaultBaseUrl: String
val name: String
val namespace: String
val nlpModel: String
val ownerConnectorType: ConnectorType?
val parameters: Map<String, String>
val path: String?
val targetConnectorType: ConnectorType
fun toConnectorConfiguration(): ConnectorConfiguration
interface BotApplicationConfigurationDAO
data class BotVersion
package fr.vsct.tock.bot.admin.dialog
Module Contents
data class ActionReport
data class ApplicationDialogFlowData
data class DialogFlowStateData
data class DialogFlowStateTransitionData
data class DialogReport
interface DialogReportDAO
data class DialogReportQuery
Module Contents
DialogReportQuery(namespace: String, nlpModel: String, language: Locale? = null, start: Long = 0, size: Int = 1, playerId: PlayerId? = null, text: String? = null, dialogId: String? = null, intentName: String? = null, exactMatch: Boolean = false, from: ZonedDateTime? = null, to: ZonedDateTime? = null, connectorType: ConnectorType? = null, displayTests: Boolean = false)
val connectorType: ConnectorType?
val dialogId: String?
val displayTests: Boolean
val exactMatch: Boolean
val from: ZonedDateTime?
val intentName: String?
val language: Locale?
val namespace: String
val nlpModel: String
val playerId: PlayerId?
val size: Int
val start: Long
val text: String?
val to: ZonedDateTime?
data class DialogReportQueryResult
package fr.vsct.tock.bot.admin.message
Module Contents
data class AttachmentConfiguration : MessageConfiguration
data class ChoiceConfiguration : MessageConfiguration
data class LocationConfiguration : MessageConfiguration
interface MessageConfiguration
data class SentenceConfiguration : MessageConfiguration
data class SentenceElementConfiguration
Module Contents
SentenceElementConfiguration(connectorType: ConnectorType = ConnectorType.none, attachments: List<AttachmentConfiguration> = emptyList(), choices: List<ChoiceConfiguration> = emptyList(), texts: Map<String, I18nLabelValue> = emptyMap(), locations: List<LocationConfiguration> = emptyList(), metadata: Map<String, String> = emptyMap(), subElements: List<SentenceSubElementConfiguration> = emptyList(), connectorMessage: ConnectorMessage? = null)
val attachments: List<AttachmentConfiguration>
val choices: List<ChoiceConfiguration>
val connectorType: ConnectorType
val locations: List<LocationConfiguration>
val metadata: Map<String, String>
val subElements: List<SentenceSubElementConfiguration>
val texts: Map<String, I18nLabelValue>
data class SentenceSubElementConfiguration
package fr.vsct.tock.bot.admin.story
Module Contents
data class StoryDefinitionConfiguration : StoryDefinitionAnswersContainer
Module Contents
StoryDefinitionConfiguration(storyId: String, botId: String, intent: Intent, currentType: AnswerConfigurationType, answers: List<AnswerConfiguration>, version: Int = 0, namespace: String = defaultNamespace, mandatoryEntities: List<StoryDefinitionConfigurationMandatoryEntity> = emptyList(), steps: List<StoryDefinitionConfigurationStep> = emptyList(), name: String = storyId, category: String = "default", description: String = "", userSentence: String = "", _id: Id<StoryDefinitionConfiguration> = newId())
val _id: Id<StoryDefinitionConfiguration>
val answers: List<AnswerConfiguration>
val botId: String
val category: String
val currentType: AnswerConfigurationType
val description: String
fun findNextSteps(story: StoryDefinitionConfiguration): List<String>
val intent: Intent
val mandatoryEntities: List<StoryDefinitionConfigurationMandatoryEntity>
val name: String
val namespace: String
val steps: List<StoryDefinitionConfigurationStep>
val storyId: String
val userSentence: String
val version: Int
interface StoryDefinitionConfigurationDAO
data class StoryDefinitionConfigurationFlowNode
data class StoryDefinitionConfigurationMandatoryEntity : StoryDefinitionAnswersContainer
data class StoryDefinitionConfigurationStep : StoryDefinitionAnswersContainer
package fr.vsct.tock.bot.admin.test
Module Contents
data class DialogExecutionReport
fun findTestClient(): TestClientService
data class TestActionReport
Module Contents
TestActionReport(playerId: PlayerId, date: Instant, message: Message, connectorType: ConnectorType?, userInterfaceType: UserInterfaceType, id: Id<Action> = newId())
TestActionReport(report: ActionReport)
TestActionReport(playerId: PlayerId, date: Instant, messages: List<Message>, connectorType: ConnectorType?, userInterfaceType: UserInterfaceType = textChat, id: Id<Action>)
val connectorType: ConnectorType?
val date: Instant
fun findFirstMessage(): Message
val id: Id<Action>
val messages: List<Message>
val playerId: PlayerId
val userInterfaceType: UserInterfaceType
interface TestClientService
data class TestDialogReport
data class TestPlan
interface TestPlanDAO
data class TestPlanExecution
package fr.vsct.tock.bot.admin.user
Module Contents
data class UserReport
interface UserReportDAO
data class UserReportQuery
Module Contents
UserReportQuery(namespace: String, nlpModel: String, language: Locale, start: Long = 0, size: Int = 1, name: String? = null, from: ZonedDateTime? = null, to: ZonedDateTime? = null, flags: Map<String, String?> = emptyMap(), displayTests: Boolean = false)
val displayTests: Boolean
val flags: Map<String, String?>
val from: ZonedDateTime?
val language: Locale
val name: String?
val namespace: String
val nlpModel: String
val size: Int
val start: Long
val to: ZonedDateTime?
data class UserReportQueryResult
package fr.vsct.tock.bot.connector
Module Contents
interface Connector
Module Contents
open fun addSuggestions(text: CharSequence, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
open fun addSuggestions(message: ConnectorMessage, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
abstract val connectorType: ConnectorType
open fun loadProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences?
open fun notify(controller: ConnectorController, recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap()): Unit
open fun refreshProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences?
abstract fun register(controller: ConnectorController): Unit
abstract fun send(event: Event, callback: ConnectorCallback, delayInMs: Long = 0): Unit
open fun toConnectorMessage(message: MediaMessage): BotBus.() -> List<ConnectorMessage>
open fun unregister(controller: ConnectorController): Unit
abstract class ConnectorBase : Connector
interface ConnectorCallback
open class ConnectorCallbackBase : ConnectorCallback
data class ConnectorConfiguration
Module Contents
ConnectorConfiguration(connectorId: String, path: String, type: ConnectorType, applicationName: String, baseUrl: String?, ownerConnectorType: ConnectorType? = null, parameters: Map<String, String> = emptyMap())
ConnectorConfiguration(connectorId: String, path: String, type: ConnectorType, ownerConnectorType: ConnectorType? = null, parameters: Map<String, String> = emptyMap())
val connectorId: String
fun getBaseUrl(): String
fun getName(): String
val ownerConnectorType: ConnectorType?
val parameters: Map<String, String>
val path: String
val type: ConnectorType
open class ConnectorData
class ConnectorException : Exception
@Target([AnnotationTarget.ANNOTATION_CLASS]) annotation class ConnectorHandler
interface ConnectorMessage
interface ConnectorProvider
data class ConnectorType
data class ConnectorTypeConfiguration
data class ConnectorTypeConfigurationField
package fr.vsct.tock.bot.connector.alexa
Module Contents
class AlexaConnector : ConnectorBase
data class AlexaConnectorCallback : ConnectorCallbackBase, SpeechletV2
val alexaConnectorType: ConnectorType
fun alexaEndConversation(): AlexaMessage
@ConnectorHandler("alexa") @Target([AnnotationTarget.CLASS]) annotation class AlexaHandler
data class AlexaInputMessage : ConnectorMessage
data class AlexaMessage : ConnectorMessage
fun I18nTranslator.alexaReprompt(reprompt: CharSequence): AlexaMessage
fun I18nTranslator.alexaStandardCard(title: CharSequence, text: CharSequence, smallImageUrl: String, largeImageUrl: String = smallImageUrl): AlexaMessage
open class AlexaTockMapper
Module Contents
AlexaTockMapper(applicationId: String)
open fun alexaEntityToTockEntity(request: IntentRequest, intent: String, slot: String, botDefinition: BotDefinition): Entity?
open fun alexaEntityToTockEntityValue(request: IntentRequest, intent: String, slot: Slot, botDefinition: BotDefinition, index: Int): NlpEntityValue
open fun alexaIntentToTockIntent(request: IntentRequest, botDefinition: BotDefinition): String
val applicationId: String
open fun getSlots(request: IntentRequest): Map<String, Slot>?
open fun toEndSessionEvent(requestEnvelope: SpeechletRequestEnvelope<SessionEndedRequest>): EndSessionEvent
open fun toEvent(userId: String, request: IntentRequest, botDefinition: BotDefinition): Event
open fun toStartSessionEvent(requestEnvelope: SpeechletRequestEnvelope<SessionStartedRequest>): StartSessionEvent
fun BotBus.endForAlexa(messageProvider: BotBus.() -> AlexaMessage, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
fun BotBus.sendToAlexa(messageProvider: BotBus.() -> AlexaMessage, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
fun BotBus.withAlexa(messageProvider: () -> AlexaMessage): BotBus
package fr.vsct.tock.bot.connector.ga
Module Contents
fun I18nTranslator.basicCard(title: CharSequence?, subtitle: CharSequence?, formattedText: CharSequence?, image: GAImage?, buttons: List<GAButton>): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence? = null, subtitle: CharSequence? = null, formattedText: CharSequence? = null, image: GAImage? = null, button: GAButton? = null): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence, subtitle: CharSequence, image: GAImage, button: GAButton): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence, button: GAButton): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence, subtitle: CharSequence): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence, image: GAImage): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence, subtitle: CharSequence, image: GAImage): GABasicCard
fun I18nTranslator.basicCard(image: GAImage): GABasicCard
fun BotBus.carouselItem(targetIntent: IntentAware, title: CharSequence, description: CharSequence? = null, image: GAImage? = null, vararg parameters: Pair<String, String>): GACarouselItem
fun BotBus.carouselItem(targetIntent: IntentAware, title: CharSequence, description: CharSequence? = null, image: GAImage? = null, parameters: Parameters): GACarouselItem
fun BotBus.carouselItem(targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, title: CharSequence, description: CharSequence? = null, image: GAImage? = null, parameters: Parameters): GACarouselItem
fun BotBus.carouselItem(targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, title: CharSequence, description: CharSequence? = null, image: GAImage? = null, vararg parameters: Pair<String, String>): GACarouselItem
fun I18nTranslator.cart(id: String, merchant: GAMerchant? = null, lineItems: List<GALineItem>, otherItems: List<GALineItem>? = null, notes: CharSequence): GACart
fun BotBus.endForGoogleAssistant(messageProvider: BotBus.() -> GAResponseConnectorMessage, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
fun I18nTranslator.expectedIntentForCarousel(items: List<GACarouselItem>): GAExpectedIntent
fun I18nTranslator.expectedIntentForList(items: List<GAListItem>, title: CharSequence? = null): GAExpectedIntent
fun I18nTranslator.expectedIntentForSimpleSelect(items: List<GASelectItem>): GAExpectedIntent
fun expectedTextIntent(): GAExpectedIntent
fun ConnectorMessage.findTransactionDecisionValueInput(): GATransactionDecisionValue?
fun ConnectorMessage.findTransactionRequirementsCheckInput(): GATransactionRequirementsCheckResult?
fun I18nTranslator.flexibleSimpleResponse(textToSpeech: CharSequence? = null, ssml: CharSequence? = null, displayText: CharSequence? = null): GASimpleResponse
fun gaAction(type: GAActionType, button: GAButton): GAAction
fun I18nTranslator.gaButton(title: CharSequence, url: String): GAButton
class GAConnector : ConnectorBase
val gaConnectorType: ConnectorType
fun I18nTranslator.gaFinalMessage(richResponse: GARichResponse): GAResponseConnectorMessage
fun I18nTranslator.gaFinalMessage(text: CharSequence? = null): GAResponseConnectorMessage
fun I18nTranslator.gaFlexibleMessageForCarousel(items: List<GACarouselItem>, suggestions: List<CharSequence> = emptyList(), oneItemTitle: CharSequence? = null, oneItemSubtitle: CharSequence? = null, oneItemDescription: CharSequence? = null, oneItemSuggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage
fun I18nTranslator.gaFlexibleMessageForCarousel(items: List<GACarouselItem>, suggestions: List<CharSequence> = emptyList(), oneItemSuggestions: List<CharSequence> = emptyList(), oneItemBasicCardProvider: (GACarouselItem) -> GABasicCard = {
basicCard(
it.title.raw,
if (it.image != null) it.description?.raw else null,
if (it.image == null) it.description?.raw else null,
it.image
)
}): GAResponseConnectorMessage
fun I18nTranslator.gaFlexibleMessageForList(items: List<GAListItem>, title: CharSequence? = null, suggestions: List<CharSequence> = emptyList(), oneItemTitle: CharSequence? = null, oneItemSubtitle: CharSequence? = null, oneItemDescription: CharSequence? = null, oneItemSuggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage
@ConnectorHandler("ga") @Target([AnnotationTarget.CLASS]) annotation class GAHandler
fun I18nTranslator.gaImage(url: String, accessibilityText: CharSequence, height: Int? = null, width: Int? = null): GAImage
fun gaLogout(): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(inputPrompt: GAInputPrompt, possibleIntents: List<GAExpectedIntent> = listOf(
expectedTextIntent()
), speechBiasingHints: List<String> = emptyList()): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(text: CharSequence, vararg suggestions: CharSequence): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(text: CharSequence, basicCard: GABasicCard): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(richResponse: GARichResponse): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(possibleIntent: GAExpectedIntent): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(possibleIntents: List<GAExpectedIntent>): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(text: CharSequence, possibleIntents: List<GAExpectedIntent>): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(gaRichResponse: GARichResponse, listItems: List<GAListItem>, title: CharSequence? = null): GAResponseConnectorMessage
fun I18nTranslator.gaMessageForCarousel(items: List<GACarouselItem>, suggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage
fun I18nTranslator.gaMessageForList(items: List<GAListItem>, title: CharSequence? = null, suggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage
fun I18nTranslator.gaOrderUpdateMessage(orderUpdate: GAOrderUpdate): GAResponseConnectorMessage
data class GARequestConnectorMessage : ConnectorMessage
data class GAResponseConnectorMessage : ConnectorMessage
fun I18nTranslator.gaTransactionDecision(proposedOrder: GAProposedOrder, orderOptions: GAOrderOptions, paymentOptions: GAPaymentOptions? = null): GAResponseConnectorMessage
fun I18nTranslator.gaTransactionRequirementsCheck(orderOptions: GAOrderOptions = orderOptions(), paymentOptions: GAPaymentOptions? = null): GAResponseConnectorMessage
fun I18nTranslator.inputPrompt(richResponse: GARichResponse, noInputPrompts: List<GASimpleResponse> = emptyList()): GAInputPrompt
fun I18nTranslator.inputPrompt(text: CharSequence, linkOutSuggestion: GALinkOutSuggestion? = null, noInputPrompts: List<GASimpleResponse> = emptyList()): GAInputPrompt
fun I18nTranslator.item(simpleResponse: GASimpleResponse? = null, basicCard: GABasicCard? = null, structuredResponse: GAStructuredResponse? = null): GAItem
fun I18nTranslator.item(basicCard: GABasicCard): GAItem
fun I18nTranslator.item(structuredResponse: GAStructuredResponse): GAItem
fun I18nTranslator.item(simpleResponse: GASimpleResponse): GAItem
fun I18nTranslator.lineItem(id: String, name: CharSequence, type: GALineItemType = GALineItemType.REGULAR, quantity: Int, description: CharSequence, image: GAImage, price: GAPrice, subLines: List<GASubLine>? = null, offerId: String? = null): GALineItem
fun I18nTranslator.lineItemTemplate(orderState: GAOrderState, price: GAPrice? = null, reason: CharSequence? = null): GALineItemUpdate
fun I18nTranslator.linkOutSuggestion(destinationName: CharSequence, url: String): GALinkOutSuggestion
fun BotBus.listItem(title: CharSequence, targetIntent: IntentAware, vararg parameters: Pair<String, String>): GAListItem
fun BotBus.listItem(title: CharSequence, targetIntent: IntentAware, description: CharSequence, imageUrl: String? = null, vararg parameters: Pair<String, String>): GAListItem
fun BotBus.listItem(title: CharSequence, targetIntent: IntentAware, parameters: Parameters): GAListItem
fun BotBus.listItem(title: CharSequence, targetIntent: IntentAware, description: CharSequence?, imageUrl: String? = null, parameters: Parameters): GAListItem
fun BotBus.listItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, parameters: Parameters): GAListItem
fun BotBus.listItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, vararg parameters: Pair<String, String>): GAListItem
fun BotBus.listItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, description: CharSequence? = null, imageUrl: String? = null, parameters: Parameters): GAListItem
fun BotBus.listItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, description: CharSequence? = null, imageUrl: String? = null, vararg parameters: Pair<String, String>): GAListItem
fun merchant(id: String, name: String): GAMerchant
fun money(currencyCode: String, units: String?, nanos: Long = 0): GAMoney
fun BotBus.optionInfo(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, vararg parameters: Pair<String, String>): GAOptionInfo
fun I18nTranslator.optionValueSpec(simpleSelect: GASimpleSelect? = null, listSelect: GAListSelect? = null, carouselSelect: GACarouselSelect? = null): GAOptionValueSpec
fun orderOptions(requestDeliveryAddress: Boolean = false, customerInfoProperties: Set<GACustomerInfoProperty> = setOf(GACustomerInfoProperty.EMAIL)): GAOrderOptions
fun I18nTranslator.orderState(state: GAState, label: CharSequence): GAOrderState
fun orderUpdate(googleOrderId: String, actionOrderId: String, orderState: GAOrderState, orderManagementActions: List<GAAction>, receipt: GAReceipt, updateTime: Instant = Instant.now(), totalPrice: GAPrice? = null, lineItemUpdates: Map<String, GALineItemUpdate> = emptyMap()): GAOrderUpdate
fun I18nTranslator.permissionIntent(optionalContext: CharSequence?, vararg permissions: GAPermission): GAExpectedIntent
fun price(type: GAPriceType, amount: GAMoney): GAPrice
fun proposedOrder(id: String, cart: GACart, otherItems: List<GALineItem>? = null, image: GAImage, termsOfServiceUrl: String, totalPrice: GAPrice): GAProposedOrder
fun receipt(confirmedActionOrderId: String, userVisibleOrderId: String): GAReceipt
fun richResponse(items: List<GAItem>, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<GASuggestion>): GARichResponse
fun I18nTranslator.richResponse(items: List<GAItem>, linkOutSuggestion: GALinkOutSuggestion? = null, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(items: List<GAItem>, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(items: List<GAItem>, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(item: GAItem, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(item: GAItem, linkOutSuggestion: GALinkOutSuggestion? = null, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, linkOutSuggestion: GALinkOutSuggestion? = null, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, basicCard: GABasicCard, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, basicCard: GABasicCard, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, basicCard: GABasicCard, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(basicCard: GABasicCard, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(basicCard: GABasicCard, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(basicCard: GABasicCard, vararg suggestions: CharSequence): GARichResponse
fun BotBus.selectItem(title: CharSequence, targetIntent: IntentAware, vararg parameters: Pair<String, String>): GASelectItem
fun BotBus.selectItem(title: CharSequence, targetIntent: IntentAware, optionTitle: CharSequence? = null, vararg parameters: Pair<String, String>): GASelectItem
fun BotBus.selectItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>, optionTitle: CharSequence? = null, parameters: Parameters): GASelectItem
fun BotBus.selectItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, optionTitle: CharSequence? = null, vararg parameters: Pair<String, String>): GASelectItem
fun BotBus.sendToGoogleAssistant(messageProvider: BotBus.() -> GAResponseConnectorMessage, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
fun I18nTranslator.simpleResponse(text: CharSequence): GASimpleResponse
fun I18nTranslator.suggestion(text: CharSequence): GASuggestion
fun BotBus.withGoogleAssistant(messageProvider: () -> GAResponseConnectorMessage): BotBus
fun BotBus.withGoogleVoiceAssistant(messageProvider: () -> GAResponseConnectorMessage): BotBus
package fr.vsct.tock.bot.connector.ga.model
package fr.vsct.tock.bot.connector.ga.model.request
Module Contents
data class GAArgument
enum class GAArgumentBuiltInName
abstract class GAArgumentValue
enum class GAArgumentValueType
data class GACapability
data class GAConversation
enum class GAConversationType
data class GACustomerInfo
data class GADate
data class GADateTime
data class GADevice
data class GAGoogleProvidedPaymentInstrument
enum class GAHoldStatus
data class GAHoldValue : GAArgumentValue
data class GAInput
enum class GAInputType
data class GALatLng
data class GALocation
data class GAOrder
data class GAPaymentInfo
enum class GAPaymentType
enum class GAPermission
data class GAPostalAddress
Module Contents
GAPostalAddress(revision: Double, regionCode: String, languageCode: String?, postalCode: String?, sortingCode: String?, administrativeArea: String?, locality: String?, sublocality: String?, addressLines: List<String>, recipients: List<String>?, organization: String?)
val addressLines: List<String>
val administrativeArea: String?
val languageCode: String?
val locality: String?
val organization: String?
val postalCode: String?
val recipients: List<String>?
val regionCode: String
val revision: Double
val sortingCode: String?
val sublocality: String?
data class GARawInput
data class GARequest
enum class GAResultType
enum class GASignInStatus
data class GASignInValue : GAArgumentValue
data class GASurface
data class GATimeOfDay
data class GATransactionDecisionCheckResult
data class GATransactionDecisionValue : GAArgumentValue
data class GATransactionRequirementsCheckResult : GAArgumentValue
enum class GATransactionUserDecision
data class GAUser
data class GAUserProfile
package fr.vsct.tock.bot.connector.ga.model.response
Module Contents
data class GAAction
data class GAActionProvidedPaymentOptions
enum class GAActionType
data class GABasicCard
data class GAButton
data class GACancellationInfo
enum class GACardNetwork
data class GACarouselItem
data class GACarouselSelect
data class GACart
data class GACustomerInfoOptions
enum class GACustomerInfoProperty
data class GACustomPushMessage
data class GAExpectedInput
data class GAExpectedIntent
data class GAFinalResponse
data class GAFulfillmentInfo
data class GAGoogleProvidedPaymentOptions
data class GAImage
data class GAInputPrompt
abstract class GAInputValueData
data class GAInTransitInfo
data class GAItem
data class GALineItem
enum class GALineItemType
data class GALineItemUpdate
data class GALinkOutSuggestion
data class GAListItem
data class GAListSelect
data class GAMerchant
data class GAMoney
data class GAOpenUrlAction
data class GAOptionInfo
data class GAOptionValueSpec : GAInputValueData
data class GAOrderOptions
data class GAOrderState
data class GAOrderUpdate
Module Contents
GAOrderUpdate(googleOrderId: String, actionOrderId: String, orderState: GAOrderState, orderManagementActions: List<GAAction>, receipt: GAReceipt, updateTime: String, totalPrice: GAPrice? = null, lineItemUpdates: Map<String, GALineItemUpdate>, userNotification: GAUserNotification? = null, infoExtension: String? = null, rejectionInfo: GARejectionInfo? = null, cancellationInfo: GACancellationInfo? = null, inTransitInfo: GAInTransitInfo? = null, fulfillmentInfo: GAFulfillmentInfo? = null, returnInfo: GAReturnInfo? = null)
val actionOrderId: String
val cancellationInfo: GACancellationInfo?
val fulfillmentInfo: GAFulfillmentInfo?
val googleOrderId: String
val infoExtension: String?
val inTransitInfo: GAInTransitInfo?
val lineItemUpdates: Map<String, GALineItemUpdate>
val orderManagementActions: List<GAAction>
val orderState: GAOrderState
val receipt: GAReceipt
val rejectionInfo: GARejectionInfo?
val returnInfo: GAReturnInfo?
val totalPrice: GAPrice?
val updateTime: String
val userNotification: GAUserNotification?
data class GAPaymentMethodTokenizationParameters
enum class GAPaymentMethodTokenizationType
data class GAPaymentOptions
enum class GaPaymentType
data class GAPermissionValueSpec : GAInputValueData
data class GAPrice
enum class GAPriceType
data class GAProposedOrder
enum class GAReasonType
data class GAReceipt
data class GARejectionInfo
data class GAResponse
data class GAResponseMetadata
data class GAReturnInfo
data class GARichResponse
data class GASelectItem
data class GASimpleResponse
data class GASimpleSelect
enum class GAState
data class GAStatus
enum class GAStatusCode
data class GAStatusDetail
data class GAStructuredResponse
data class GASubLine
data class GASuggestion
data class GATransactionDecisionValueSpec : GAInputValueData
data class GATransactionRequirementsCheckSpec : GAInputValueData
data class GAUserNotification
package fr.vsct.tock.bot.connector.media
package fr.vsct.tock.bot.connector.messenger
Module Contents
fun BotBus.attachment(attachmentUrl: String, type: AttachmentType, vararg quickReplies: QuickReply): AttachmentMessage
fun BotBus.attachment(attachmentUrl: String, type: AttachmentType, quickReplies: List<QuickReply>): AttachmentMessage
fun BotBus.audio(audioUrl: String, vararg quickReplies: QuickReply): AttachmentMessage
fun BotBus.audio(audioUrl: String, quickReplies: List<QuickReply>): AttachmentMessage
fun I18nTranslator.buttonsTemplate(text: CharSequence, vararg actions: UserAction): AttachmentMessage
fun I18nTranslator.buttonsTemplate(text: CharSequence, actions: List<UserAction> = emptyList()): AttachmentMessage
fun I18nTranslator.callToButton(title: CharSequence, phoneNumber: String): CallButton
fun BotBus.endForMessenger(delay: Long = botDefinition.defaultDelay(currentAnswerIndex), messageProvider: BotBus.() -> MessengerConnectorMessage): BotBus
fun flexibleListTemplate(elements: List<Element>, topElementStyle: ListElementStyle? = null, vararg actions: UserAction): AttachmentMessage
fun flexibleListTemplate(elements: List<Element>, topElementStyle: ListElementStyle? = null, actions: List<UserAction> = emptyList()): AttachmentMessage
fun I18nTranslator.genericElement(title: CharSequence, subtitle: CharSequence? = null, imageUrl: String? = null, buttons: List<Button>? = null): Element
fun genericTemplate(vararg elements: Element): AttachmentMessage
fun genericTemplate(elements: List<Element>, quickReplies: List<QuickReply>): AttachmentMessage
fun genericTemplate(elements: List<Element>, vararg quickReplies: QuickReply): AttachmentMessage
fun BotBus.image(imageUrl: String, vararg quickReplies: QuickReply): AttachmentMessage
fun BotBus.image(imageUrl: String, quickReplies: List<QuickReply>): AttachmentMessage
fun I18nTranslator.listElement(title: CharSequence, subtitle: CharSequence? = null, imageUrl: String? = null, button: Button? = null): Element
fun listTemplate(e1: Element, e2: Element, e3: Element? = null, e4: Element? = null, topElementStyle: ListElementStyle? = null, vararg actions: UserAction): AttachmentMessage
fun listTemplate(e1: Element, e2: Element, e3: Element? = null, e4: Element? = null, topElementStyle: ListElementStyle? = null, actions: List<UserAction> = emptyList()): AttachmentMessage
fun listTemplate(elements: List<Element>, topElementStyle: ListElementStyle? = null, vararg actions: UserAction): AttachmentMessage
fun listTemplate(elements: List<Element>, topElementStyle: ListElementStyle? = null, actions: List<UserAction> = emptyList()): AttachmentMessage
fun locationQuickReply(): QuickReply
fun loginButton(url: String): LoginButton
fun logoutButton(): LogoutButton
fun mediaTemplate(mediaUrl: String, mediaType: MediaType = MediaType.image, sharable: Boolean = false, vararg actions: UserAction): AttachmentMessage
fun mediaTemplate(mediaUrl: String, mediaType: MediaType = MediaType.image, sharable: Boolean = false, actions: List<UserAction> = emptyList()): AttachmentMessage
typealias MessengerAttachmentType = AttachmentType
class MessengerConnector : ConnectorBase
Module Contents
fun addSuggestions(text: CharSequence, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
fun addSuggestions(message: ConnectorMessage, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
val applicationId: String
val appToken: String
fun getConnectorByPageId(pageId: String): MessengerConnector?
fun getSecondaryReceivers(): List<SecondaryReceiverData>?
fun getThreadOwner(userId: PlayerId): String?
fun healthcheck(): Boolean
fun loadProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences
fun notify(controller: ConnectorController, recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, parameters: Map<String, String>): Unit
val pageId: String
fun passThreadControl(userId: PlayerId, metadata: String? = null): SendResponse?
val path: String
fun refreshProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences?
fun register(controller: ConnectorController): Unit
fun requestThreadControl(userId: PlayerId, metadata: String? = null): SendResponse?
fun send(event: Event, callback: ConnectorCallback, delayInMs: Long): Unit
fun sendCustomEvent(applicationId: String, customEventRequest: CustomEventRequest): Unit
fun sendCustomEvent(customEventRequest: CustomEventRequest): Unit
fun sendEvent(event: Event, transformMessageRequest: (MessageRequest) -> MessageRequest = { it }, postMessage: (String) -> Unit = {}, transformActionRequest: (ActionRequest) -> ActionRequest = { it }): SendResponse?
fun sendOptInEvent(event: Event): Unit
fun sendSimpleEvent(event: Event, transformActionRequest: (ActionRequest) -> ActionRequest = { it }): SendResponse?
fun takeThreadControl(userId: PlayerId, metadata: String? = null): SendResponse?
fun toConnectorMessage(message: MediaMessage): BotBus.() -> List<ConnectorMessage>
val token: String
fun unregister(controller: ConnectorController): Unit
val verifyToken: String?
class MessengerConnectorCallback : ConnectorCallbackBase
val messengerConnectorType: ConnectorType
@ConnectorHandler("messenger") @Target([AnnotationTarget.CLASS]) annotation class MessengerHandler
fun I18nTranslator.nlpPostbackButton(title: CharSequence, textToSend: CharSequence = title): PostbackButton
fun I18nTranslator.nlpQuickReply(title: CharSequence, textToSend: CharSequence = title, imageUrl: String? = null): QuickReply
fun BotBus.postbackButton(title: CharSequence, targetIntent: IntentAware, vararg parameters: Pair<String, String>): PostbackButton
fun BotBus.postbackButton(title: CharSequence, targetIntent: IntentAware, parameters: Parameters): PostbackButton
fun BotBus.postbackButton(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters): PostbackButton
fun BotBus.postbackButton(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, vararg parameters: Pair<String, String>): PostbackButton
fun BotBus.quickReply(title: CharSequence, targetIntent: IntentAware, parameters: Parameters): QuickReply
fun BotBus.quickReply(title: CharSequence, targetIntent: IntentAware, imageUrl: String? = null, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters): QuickReply
fun BotBus.quickReply(title: CharSequence, targetIntent: IntentAware, imageUrl: String? = null, step: StoryStep<out StoryHandlerDefinition>? = null, vararg parameters: Pair<String, String>): QuickReply
fun BotBus.quickReply(title: CharSequence, targetIntent: IntentAware, imageUrl: String? = null, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Collection<Pair<String, String>>): QuickReply
fun BotBus.quickReply(title: CharSequence, targetIntent: IntentAware, imageUrl: String? = null, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String>): QuickReply
fun BotBus.sendToMessenger(delay: Long = botDefinition.defaultDelay(currentAnswerIndex), messageProvider: BotBus.() -> MessengerConnectorMessage): BotBus
fun standaloneMessengerAnswer(playerId: PlayerId, applicationId: String, recipientId: PlayerId, text: String, lastAnswer: Boolean = true, priority: ActionPriority = ActionPriority.normal, notificationType: ActionNotificationType? = null): SendSentence
fun standaloneMessengerAnswer(playerId: PlayerId, applicationId: String, recipientId: PlayerId, lastAnswer: Boolean = true, priority: ActionPriority = ActionPriority.normal, notificationType: ActionNotificationType? = null, messageProvider: () -> MessengerConnectorMessage): SendSentence
fun standaloneMessengerAnswers(playerId: PlayerId, applicationId: String, recipientId: PlayerId, priority: ActionPriority = ActionPriority.normal, notificationType: ActionNotificationType? = null, messagesProvider: () -> List<MessengerConnectorMessage>): List<SendSentence>
fun I18nTranslator.standalonePostbackButton(title: CharSequence, targetIntent: IntentAware, parameters: Parameters = Parameters(), step: StoryStep<out StoryHandlerDefinition>? = null, busStep: StoryStep<out StoryHandlerDefinition>? = null, currentIntent: Intent? = null): PostbackButton
fun I18nTranslator.standaloneQuickReply(title: CharSequence, targetIntent: IntentAware, parameters: Parameters = Parameters(), step: StoryStep<out StoryHandlerDefinition>? = null, imageUrl: String? = null, busStep: StoryStep<out StoryHandlerDefinition>? = null, currentIntent: Intent? = null): QuickReply
fun I18nTranslator.text(text: CharSequence, vararg quickReplies: QuickReply): TextMessage
fun I18nTranslator.text(text: CharSequence, quickReplies: List<QuickReply>): TextMessage
fun I18nTranslator.urlButton(title: CharSequence, url: String): UrlButton
fun BotBus.video(videoUrl: String, vararg quickReplies: QuickReply): AttachmentMessage
fun BotBus.video(videoUrl: String, quickReplies: List<QuickReply>): AttachmentMessage
fun BotBus.withMessenger(messageProvider: () -> MessengerConnectorMessage): BotBus
package fr.vsct.tock.bot.connector.messenger.model
package fr.vsct.tock.bot.connector.messenger.model.attachment
package fr.vsct.tock.bot.connector.messenger.model.handover
package fr.vsct.tock.bot.connector.messenger.model.send
Module Contents
data class ActionRequest
data class Attachment
class AttachmentMessage : Message
enum class AttachmentType
abstract class Button : UserAction
data class ButtonPayload : ModelPayload
enum class ButtonType
data class CallButton : Button
data class CustomEvent
data class CustomEventRequest
Module Contents
CustomEventRequest(customEvent: CustomEvent, pageId: String, pageScopedUserId: String, event: String = "CUSTOM_APP_EVENTS", advertiserTrackingEnabled: Short = 0, applicationTrackingEnabled: Short = 1, extinfo: String = mapper.writeValueAsString(listOf("mb1")))
CustomEventRequest(customEvents: List<CustomEvent>, pageId: String, pageScopedUserId: String, event: String = "CUSTOM_APP_EVENTS", advertiserTrackingEnabled: Short = 0, applicationTrackingEnabled: Short = 1, extinfo: String = mapper.writeValueAsString(listOf("mb1")))
val advertiserTrackingEnabled: Short
val applicationTrackingEnabled: Short
val customEvents: List<CustomEvent>
val event: String
val extinfo: String
val pageId: String
val pageScopedUserId: String
data class Element
data class GenericPayload : ModelPayload
enum class ListElementStyle
data class ListPayload : ModelPayload
class LocationQuickReply : QuickReply
data class LoginButton : Button
class LogoutButton : Button
data class MediaElement
data class MediaPayload : ModelPayload
enum class MediaType
abstract class Message : MessengerConnectorMessage
data class MessageRequest
enum class MessageTag
enum class MessagingType
abstract class ModelPayload : Payload
enum class NotificationType
abstract class Payload
enum class PayloadType
data class PostbackButton : Button
abstract class QuickReply : UserAction
enum class QuickReplyContentType
enum class SenderAction
data class SendResponse
data class SendResponseError
data class SendResponseErrorContainer
class TextMessage : Message
data class TextQuickReply : QuickReply
data class UrlButton : Button
data class UrlPayload : Payload
interface UserAction
package fr.vsct.tock.bot.connector.messenger.model.webhook
package fr.vsct.tock.bot.connector.rocketchat
package fr.vsct.tock.bot.connector.slack
Module Contents
fun I18nTranslator.attachmentField(title: String, value: String, short: Boolean = true): AttachmentField
fun emoji(emoji: SlackEmoji): String
fun emojiMessage(emoji: SlackEmoji): SlackMessageOut
fun BotBus.endForSlack(delay: Long = botDefinition.defaultDelay(currentAnswerIndex), messageProvider: BotBus.() -> SlackConnectorMessage): BotBus
fun I18nTranslator.multiLineMessage(lines: List<CharSequence>, channel: String? = null): SlackMessageOut
fun BotBus.sendToSlack(delay: Long = botDefinition.defaultDelay(currentAnswerIndex), messageProvider: BotBus.() -> SlackConnectorMessage): BotBus
fun I18nTranslator.slackAttachment(text: CharSequence? = null, vararg buttons: Button): SlackMessageAttachment
fun I18nTranslator.slackAttachment(text: CharSequence? = null, buttons: List<Button> = emptyList(), color: String = "good", pretext: String? = null, fallback: String = translate(text).toString(), vararg fields: AttachmentField): SlackMessageAttachment
fun BotBus.slackButton(title: CharSequence, targetIntent: IntentAware, parameters: Parameters, name: String = "default"): Button
fun BotBus.slackButton(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters, name: String = "default"): Button
fun BotBus.slackButton(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, vararg parameters: Pair<String, String>, name: String = "default"): Button
object SlackClient
class SlackConnector : ConnectorBase
val slackConnectorType: ConnectorType
@ConnectorHandler("slack") @Target([AnnotationTarget.CLASS]) annotation class SlackHandler
fun I18nTranslator.slackMessage(message: CharSequence, vararg attachments: SlackMessageAttachment): SlackMessageOut
fun I18nTranslator.slackMessage(message: CharSequence, channel: String? = null, vararg attachments: SlackMessageAttachment): SlackMessageOut
fun I18nTranslator.textMessage(message: CharSequence): SlackMessageOut
fun BotBus.withSlack(messageProvider: () -> SlackConnectorMessage): BotBus
package fr.vsct.tock.bot.connector.slack.model
package fr.vsct.tock.bot.connector.slack.model.old
package fr.vsct.tock.bot.connector.teams
package fr.vsct.tock.bot.connector.teams.auth
package fr.vsct.tock.bot.connector.teams.messages
package fr.vsct.tock.bot.connector.teams.token
package fr.vsct.tock.bot.connector.whatsapp
package fr.vsct.tock.bot.connector.whatsapp.model.common
package fr.vsct.tock.bot.connector.whatsapp.model.send
package fr.vsct.tock.bot.connector.whatsapp.model.webhook
package fr.vsct.tock.bot.definition
Module Contents
fun bot(botId: String, stories: List<StoryDefinition>, namespace: String = "app", nlpModelName: String = botId, unknownStory: StoryDefinition = defaultUnknownStory, hello: IntentAware? = null, goodbye: IntentAware? = null, noInput: IntentAware? = null, botDisabled: IntentAware? = null, botEnabled: IntentAware? = null, userLocation: IntentAware? = null, handleAttachment: IntentAware? = null, eventListener: EventListener = EventListenerBase(), keywordStory: StoryDefinition = defaultKeywordStory, conversation: DialogFlowDefinition? = null): SimpleBotDefinition
interface BotAnswerInterceptor
interface BotDefinition : I18nKeyProvider
Module Contents
abstract val botDisabledStory: StoryDefinition?
open val botEnabledListener: (Action) -> Unit
abstract val botEnabledStory: StoryDefinition?
abstract val botId: String
var defaultBreath: Long
open fun defaultDelay(answerIndex: Int): Long
abstract val defaultUnknownAnswer: I18nLabelValue
open fun entity(name: String, role: String? = null): Entity
open fun errorAction(playerId: PlayerId, applicationId: String, recipientId: PlayerId): Action
abstract val eventListener: EventListener
open fun findIntent(intent: String): Intent
fun findIntent(stories: List<StoryDefinition>, intent: String): Intent
open fun findStoryDefinition(intent: IntentAware?): StoryDefinition
open fun findStoryDefinition(intent: String?): StoryDefinition
fun findStoryDefinition(stories: List<StoryDefinition>, intent: String?, unknownStory: StoryDefinition, keywordStory: StoryDefinition): StoryDefinition
open val flowDefinition: DialogFlowDefinition?
abstract val goodbyeStory: StoryDefinition?
abstract val handleAttachmentStory: StoryDefinition?
abstract val helloStory: StoryDefinition?
open fun i18n(defaultLabel: CharSequence, args: List<Any?>): I18nLabelValue
open fun i18nTranslator(userLocale: Locale, connectorType: ConnectorType, userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, contextId: String? = null): I18nTranslator
open fun isBotDisabledIntent(intent: Intent?): Boolean
open fun isBotEnabledIntent(intent: Intent?): Boolean
abstract val keywordStory: StoryDefinition
abstract val namespace: String
abstract val nlpModelName: String
abstract val noInputStory: StoryDefinition?
abstract val stories: List<StoryDefinition>
open val testBehaviour: TestBehaviour
abstract val unknownStory: StoryDefinition
abstract val userLocationStory: StoryDefinition?
open class BotDefinitionBase : BotDefinition
Module Contents
BotDefinitionBase(botId: String, stories: Array<out StoryDefinition>)
BotDefinitionBase(botId: String, namespace: String, stories: List<StoryDefinition>, nlpModelName: String = botId, unknownStory: StoryDefinition = defaultUnknownStory, helloStory: StoryDefinition? = null, goodbyeStory: StoryDefinition? = null, noInputStory: StoryDefinition? = null, botDisabledStory: StoryDefinition? = null, botEnabledStory: StoryDefinition? = null, userLocationStory: StoryDefinition? = null, handleAttachmentStory: StoryDefinition? = null, eventListener: EventListener = EventListenerBase(), keywordStory: StoryDefinition = defaultKeywordStory, flowDefinition: DialogFlowDefinition? = null)
open val botDisabledStory: StoryDefinition?
open val botEnabledStory: StoryDefinition?
open val botId: String
val defaultKeywordStory: SimpleStoryDefinition
open val defaultUnknownAnswer: I18nLabelValue
val defaultUnknownStory: SimpleStoryDefinition
fun deleteKeywordHandler(bus: BotBus, sendEnd: Boolean = true): Unit
fun endTestContextKeywordHandler(bus: BotBus, sendEnd: Boolean = true): Unit
open val eventListener: EventListener
open val flowDefinition: DialogFlowDefinition?
fun getKeyword(bus: BotBus): String?
open val goodbyeStory: StoryDefinition?
open val handleAttachmentStory: StoryDefinition?
open val helloStory: StoryDefinition?
open val keywordStory: StoryDefinition
open val namespace: String
open val nlpModelName: String
open val noInputStory: StoryDefinition?
open val stories: List<StoryDefinition>
fun testContextKeywordHandler(bus: BotBus, sendEnd: Boolean = true): Unit
open fun toString(): String
open val unknownStory: StoryDefinition
open val userLocationStory: StoryDefinition?
interface BotProvider
open class BotProviderBase : BotProvider
open class ConfigurableStoryHandler<out T : StoryHandlerDefinition> : StoryHandlerBase<T>
typealias ConnectorDef<T> = ConnectorStoryHandlerBase<T>
interface ConnectorStoryHandler<out T : StoryHandlerDefinition> : BotBus
abstract class ConnectorStoryHandlerBase<out T : StoryHandlerDefinition> : BotBus, ConnectorStoryHandler<T>
data class DialogFlowDefinition
data class DialogFlowState
data class DialogFlowStateTransition
enum class DialogFlowStateTransitionType
interface EventListener
open class EventListenerBase : EventListener
typealias Handler<T> = StoryHandlerBase<T>
typealias HandlerDef<T> = StoryHandlerDefinitionBase<T>
data class Intent : IntentAware
interface IntentAware
interface IntentAwareBase : IntentAware
typealias IntentDef = IntentAwareBase
val noStep: SimpleStoryStep
interface ParameterKey
data class Parameters
class SimpleBotDefinition : BotDefinitionBase
Module Contents
SimpleBotDefinition(botId: String, namespace: String, stories: List<StoryDefinition>, nlpModelName: String = botId, unknownStory: StoryDefinition = BotDefinitionBase.defaultUnknownStory, helloStory: StoryDefinition? = null, goodbyeStory: StoryDefinition? = null, noInputStory: StoryDefinition? = null, botDisabledStory: StoryDefinition? = null, botEnabledStory: StoryDefinition? = null, userLocationStory: StoryDefinition? = null, handleAttachmentStory: StoryDefinition? = null, eventListener: EventListener = EventListenerBase(), keywordStory: StoryDefinition = BotDefinitionBase.defaultKeywordStory, conversation: DialogFlowDefinition? = null)
typealias SimpleHandler = SimpleStoryHandlerBase
open class SimpleStoryDefinition : StoryDefinition
Module Contents
SimpleStoryDefinition(id: String, storyHandler: StoryHandler, steps: Array<out StoryStep<StoryHandlerDefinition>> = emptyArray(), starterIntents: Set<IntentAware>, intents: Set<IntentAware> = starterIntents, unsupportedUserInterfaces: Set<UserInterfaceType> = emptySet())
SimpleStoryDefinition(id: String, storyHandler: StoryHandler, starterIntents: Set<Intent>, intents: Set<Intent> = starterIntents, steps: Set<StoryStep<StoryHandlerDefinition>> = emptySet(), unsupportedUserInterfaces: Set<UserInterfaceType> = emptySet())
open val id: String
open val intents: Set<Intent>
open val starterIntents: Set<Intent>
open val steps: Set<StoryStep<StoryHandlerDefinition>>
open val storyHandler: StoryHandler
open val unsupportedUserInterfaces: Set<UserInterfaceType>
abstract class SimpleStoryHandlerBase : StoryHandlerBase<StoryHandlerDefinition>
interface SimpleStoryStep : StoryStep<StoryHandlerDefinition>
fun story(handler: SimpleStoryHandlerBase, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null): StoryDefinitionBase
fun story(intentName: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null, handler: BotBus.() -> Unit): StoryDefinitionBase
inline fun <reified T : StoryHandlerDefinition> story(handler: StoryHandlerBase<T>, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null): StoryDefinitionBase
fun story(intent: IntentAware, storyHandler: StoryHandler, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null): StoryDefinitionBase
inline fun <reified T : StoryHandlerDefinition> storyDef(intentName: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null, noinline handlerDefInstantiator: (BotBus) -> T = { T::class.primaryConstructor!!.call(it) }, noinline preconditionsChecker: BotBus.() -> Unit): StoryDefinitionBase
interface StoryDefinition : IntentAware
open class StoryDefinitionBase : StoryDefinition
interface StoryDefinitionExtended : StoryDefinition
inline fun <reified T : StoryHandlerDefinition, reified S> storyDefWithSteps(intentName: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), unsupportedUserInterface: UserInterfaceType? = null, noinline handlerDefInstantiator: (BotBus) -> T = { T::class.primaryConstructor!!.call(it) }, noinline preconditionsChecker: BotBus.() -> Unit): StoryDefinitionBase where S : Enum<S>, S : StoryStep<out StoryHandlerDefinition>
interface StoryHandler
abstract class StoryHandlerBase<out T : StoryHandlerDefinition> : StoryHandler, I18nKeyProvider, IntentAware
interface StoryHandlerDefinition : BotBus
abstract class StoryHandlerDefinitionBase<T : ConnectorStoryHandlerBase<*>> : BotBus, StoryHandlerDefinition
interface StoryHandlerListener
interface StoryStep<T : StoryHandlerDefinition>
inline fun <reified T> storyWithSteps(handler: StoryHandlerBase<*>, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), unsupportedUserInterface: UserInterfaceType? = null): StoryDefinitionBase where T : Enum<T>, T : StoryStep<out StoryHandlerDefinition>
inline fun <reified T> storyWithSteps(intent: IntentAware, storyHandler: StoryHandler, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), unsupportedUserInterface: UserInterfaceType? = null): StoryDefinitionBase where T : Enum<T>, T : StoryStep<out StoryHandlerDefinition>
inline fun <reified T> storyWithSteps(intentName: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), unsupportedUserInterface: UserInterfaceType? = null, noinline handler: BotBus.() -> Unit): StoryDefinitionBase where T : Enum<T>, T : StoryStep<out StoryHandlerDefinition>
interface TestBehaviour
open class TestBehaviourBase : TestBehaviour
package fr.vsct.tock.bot.engine
Module Contents
interface BotBus : I18nTranslator
Module Contents
abstract val action: Action
abstract val applicationId: String
open fun booleanChoice(key: ParameterKey): Boolean
abstract val botDefinition: BotDefinition
abstract val botId: PlayerId
open fun changeContextValue(name: String, value: Any?): Unit
open fun changeContextValue(key: ParameterKey, value: Any?): Unit
open fun changeEntityText(entity: Entity, textContent: String?): Unit
open fun changeEntityValue(role: String, newValue: EntityValue?): Unit
open fun changeEntityValue(entity: Entity, newValue: Value?): Unit
open fun changeEntityValue(entity: Entity, newValue: EntityValue): Unit
open fun changeEntityValue(entity: Entity, textContent: String): Unit
open fun choice(key: ParameterKey): String?
abstract val connectorData: ConnectorData
open val contextId: String?
open fun <T : Any> contextValue(name: String): T?
open fun <T : Any> contextValue(key: ParameterKey): T?
abstract val currentAnswerIndex: Int
abstract val dialog: Dialog
open fun end(delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
open fun end(i18nText: CharSequence, delay: Long = botDefinition.defaultDelay(currentAnswerIndex), vararg i18nArgs: Any?): BotBus
open fun end(i18nText: CharSequence, vararg i18nArgs: Any?): BotBus
open fun end(message: Message, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
abstract fun end(action: Action, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
open fun end(messages: MessagesList, initialDelay: Long = 0): BotBus
open fun end(delay: Long = botDefinition.defaultDelay(currentAnswerIndex), messageProvider: BotBus.() -> Any?): BotBus
open fun endRawText(plainText: CharSequence?, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
abstract val entities: Map<String, EntityStateValue>
open fun entityText(entity: Entity): String?
open fun entityText(role: String): String?
open fun <T : Value> entityValue(role: String, valueTransformer: (EntityValue) -> T? = @Suppress("UNCHECKED_CAST") { it.value as? T? }): T?
open fun <T : Value> entityValue(entity: Entity, valueTransformer: (EntityValue) -> T? = @Suppress("UNCHECKED_CAST") { it.value as? T? }): T?
open fun entityValueDetails(entity: Entity): EntityValue?
open fun entityValueDetails(role: String): EntityValue?
abstract fun <T> getBusContextValue(name: String): T?
open fun <T> getBusContextValue(key: ParameterKey): T?
open fun handleAndSwitchStory(storyDefinition: StoryDefinition): Unit
open fun hasActionEntity(role: String): Boolean
open fun hasActionEntity(entity: Entity): Boolean
open fun hasChoiceValue(param: ParameterKey, value: ParameterKey): Boolean
open fun i18n(defaultLabel: CharSequence, args: List<Any?>): I18nLabelValue
open fun i18nKey(key: String, defaultLabel: CharSequence, vararg args: Any?): I18nLabelValue
abstract var i18nProvider: I18nKeyProvider
abstract val intent: IntentAware?
open fun isChoiceAction(): Boolean
open fun isFeatureEnabled(feature: FeatureType, default: Boolean = false): Boolean
open fun isIntent(intentOwner: IntentAware): Boolean
abstract fun markAsUnknown(): Unit
abstract var nextUserActionState: NextUserActionState?
open fun nlpStats(): NlpCallStats?
abstract fun reloadProfile(): Unit
open fun removeAllEntityValues(): Unit
open fun removeEntityValue(role: String): Unit
open fun removeEntityValue(entity: Entity): Unit
open fun resetDialogState(): Unit
fun retrieveCurrentBus(): BotBus?
open fun send(i18nText: CharSequence, delay: Long = botDefinition.defaultDelay(currentAnswerIndex), vararg i18nArgs: Any?): BotBus
open fun send(i18nText: CharSequence, vararg i18nArgs: Any?): BotBus
open fun send(delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
open fun send(delay: Long = botDefinition.defaultDelay(currentAnswerIndex), messageProvider: BotBus.() -> Any?): BotBus
open fun send(message: Message, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
open fun send(messages: MessagesList, initialDelay: Long = 0): BotBus
abstract fun send(action: Action, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
abstract fun sendRawText(plainText: CharSequence?, delay: Long = botDefinition.defaultDelay(currentAnswerIndex)): BotBus
abstract fun setBusContextValue(key: String, value: Any?): Unit
open fun setBusContextValue(key: ParameterKey, value: Any?): Unit
open fun skipAnswer(): Unit
open var step: StoryStep<out StoryHandlerDefinition>?
abstract var story: Story
open fun switchStory(storyDefinition: StoryDefinition): Unit
abstract val targetConnectorType: ConnectorType
abstract val userId: PlayerId
abstract val userInterfaceType: UserInterfaceType
abstract val userLocale: Locale
abstract val userPreferences: UserPreferences
open val userText: String?
abstract val userTimeline: UserTimeline
open fun withMessage(message: ConnectorMessage): BotBus
abstract fun withMessage(connectorType: ConnectorType, messageProvider: () -> ConnectorMessage): BotBus
abstract fun withNotificationType(notificationType: ActionNotificationType): BotBus
abstract fun withPriority(priority: ActionPriority): BotBus
abstract fun withVisibility(visibility: ActionVisibility): BotBus
object BotRepository
interface ConnectorController
Module Contents
abstract val botDefinition: BotDefinition
abstract val connector: Connector
open val connectorType: ConnectorType
open fun errorMessage(playerId: PlayerId, applicationId: String, recipientId: PlayerId): Action
abstract fun handle(event: Event, data: ConnectorData = ConnectorData(ConnectorCallbackBase(event.applicationId, connector.connectorType))): Unit
open fun notify(recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap()): Unit
abstract fun registerServices(serviceIdentifier: String, installer: (Router) -> Unit): Unit
abstract fun support(action: Action, data: ConnectorData = ConnectorData(ConnectorCallbackBase(action.applicationId, connector.connectorType))): Double
abstract fun unregisterServices(): Unit
interface I18nTranslator : I18nKeyProvider
package fr.vsct.tock.bot.engine.action
Module Contents
abstract class Action : Event
data class ActionMetadata
enum class ActionNotificationType
enum class ActionPriority
enum class ActionVisibility
class SendAttachment : Action
class SendChoice : Action
Module Contents
SendChoice(playerId: PlayerId, applicationId: String, recipientId: PlayerId, intentName: String, step: StoryStep<out StoryHandlerDefinition>?, parameters: Map<String, String> = emptyMap(), id: Id<Action> = newId(), date: Instant = Instant.now(), state: EventState = EventState(), metadata: ActionMetadata = ActionMetadata())
SendChoice(playerId: PlayerId, applicationId: String, recipientId: PlayerId, intentName: String, parameters: Map<String, String> = emptyMap(), id: Id<Action> = newId(), date: Instant = Instant.now(), state: EventState = EventState(), metadata: ActionMetadata = ActionMetadata())
fun decodeChoiceId(id: String): Pair<String, Map<String, String>>
fun encodeChoiceId(bus: BotBus, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap()): String
fun encodeChoiceId(intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap(), busStep: StoryStep<out StoryHandlerDefinition>? = null, currentIntent: Intent? = null): String
fun encodeNlpChoiceId(nlp: String): String
const val EXIT_INTENT: String
const val IMAGE_PARAMETER: String
val intentName: String
const val LOGIN_INTENT: String
const val LOGOUT_INTENT: String
const val NLP: String
fun obfuscate(mode: StringObfuscatorMode, playerId: PlayerId): Event
val parameters: Map<String, String>
const val PHONE_CALL_INTENT: String
const val PREVIOUS_INTENT_PARAMETER: String
fun step(): String?
const val STEP_PARAMETER: String
const val TITLE_PARAMETER: String
fun toEncodedId(): String
fun toMessage(): Message
fun toString(): String
const val URL_PARAMETER: String
class SendLocation : Action
open class SendSentence : Action
Module Contents
SendSentence(playerId: PlayerId, applicationId: String, recipientId: PlayerId, text: CharSequence?, messages: MutableList<ConnectorMessage> = mutableListOf(), id: Id<Action> = newId(), date: Instant = Instant.now(), state: EventState = EventState(), metadata: ActionMetadata = ActionMetadata(), nlpStats: NlpCallStats? = null, precomputedNlp: NlpResult? = null)
fun changeConnectorMessage(message: ConnectorMessage): SendSentence
fun hasEmptyText(): Boolean
fun hasMessage(type: ConnectorType): Boolean
fun message(type: ConnectorType): ConnectorMessage?
open val messages: MutableList<ConnectorMessage>
open var nlpStats: NlpCallStats?
open fun obfuscate(mode: StringObfuscatorMode, playerId: PlayerId): Event
val precomputedNlp: NlpResult?
val stringText: String?
val text: CharSequence?
open fun toMessage(): Message
open fun toString(): String
package fr.vsct.tock.bot.engine.config
package fr.vsct.tock.bot.engine.dialog
Module Contents
data class ArchivedEntityValue
data class Dialog
interface DialogFlowDAO
data class DialogState
Module Contents
DialogState(currentIntent: Intent? = null, entityValues: MutableMap<String, EntityStateValue> = mutableMapOf(), context: MutableMap<String, Any> = mutableMapOf(), userLocation: UserLocation? = null, nextActionState: NextUserActionState? = null)
fun changeValue(entity: Entity, newValue: Value?): Unit
fun changeValue(newValue: EntityValue): Unit
fun changeValue(role: String, newValue: EntityValue?): Unit
fun cleanupState(): Unit
val context: MutableMap<String, Any>
var currentIntent: Intent?
val entityValues: MutableMap<String, EntityStateValue>
fun initFromDialogState(dialog: DialogState): DialogState
var nextActionState: NextUserActionState?
fun resetAllEntityValues(): Unit
fun resetState(): Unit
fun resetValue(role: String): Unit
fun setContextValue(name: String, value: Any?): Unit
fun setValue(role: String, value: EntityValue): Unit
fun setValue(entity: Entity, value: Value): Unit
var userLocation: UserLocation?
data class EntityStateValue
data class EntityValue
Module Contents
EntityValue(nlpResult: NlpResult, value: NlpEntityValue)
EntityValue(sentence: String, value: NlpEntityValue)
EntityValue(entity: Entity, value: Value?, content: String? = null)
EntityValue(start: Int?, end: Int?, entity: Entity, content: String?, value: Value? = null, evaluated: Boolean = false, subEntities: List<EntityValue> = emptyList(), probability: Double = 1.0, mergeSupport: Boolean = false)
val content: String?
val end: Int?
val entity: Entity
val evaluated: Boolean
val mergeSupport: Boolean
val probability: Double
val start: Int?
val subEntities: List<EntityValue>
fun toString(): String
val value: Value?
data class EventState
fr.vsct.tock.nlp.api.client.model.Entity
data class NextUserActionState
data class Snapshot
data class Story
package fr.vsct.tock.bot.engine.event
package fr.vsct.tock.bot.engine.feature
Module Contents
interface FeatureDAO
Module Contents
open fun addFeature(botId: String, namespace: String, enabled: Boolean, type: FeatureType): Unit
abstract fun addFeature(botId: String, namespace: String, enabled: Boolean, category: String, name: String): Unit
open fun deleteFeature(botId: String, namespace: String, type: FeatureType): Unit
abstract fun deleteFeature(botId: String, namespace: String, category: String, name: String): Unit
abstract fun disable(botId: String, namespace: String, category: String, name: String): Unit
open fun disable(botId: String, namespace: String, type: FeatureType): Unit
abstract fun enable(botId: String, namespace: String, category: String, name: String): Unit
open fun enable(botId: String, namespace: String, type: FeatureType): Unit
abstract fun getFeatures(botId: String, namespace: String): List<FeatureState>
open fun isEnabled(botId: String, namespace: String, type: FeatureType, default: Boolean = false): Boolean
abstract fun isEnabled(botId: String, namespace: String, category: String, name: String, default: Boolean = false): Boolean
data class FeatureState
interface FeatureType
package fr.vsct.tock.bot.engine.message
Module Contents
data class Attachment : Message
data class Choice : Message
Module Contents
Choice(intentName: String, step: StoryStep<out StoryHandlerDefinition>, parameters: Map<String, String> = emptyMap(), delay: Long = 0)
Choice(intentName: String, parameters: Map<String, String> = emptyMap(), delay: Long = 0)
val delay: Long
val eventType: EventType
val intentName: String
fun isSimpleMessage(): Boolean
val parameters: Map<String, String>
fun toAction(playerId: PlayerId, applicationId: String, recipientId: PlayerId): Action
fun toPrettyString(): String
data class GenericElement
data class GenericMessage
Module Contents
GenericMessage(connectorMessage: ConnectorMessage, attachments: List<Attachment> = emptyList(), choices: List<Choice> = emptyList(), texts: Map<String, String> = emptyMap(), locations: List<Location> = emptyList(), metadata: Map<String, String> = emptyMap(), subElements: List<GenericElement> = emptyList())
GenericMessage(connectorType: ConnectorType = ConnectorType.none, attachments: List<Attachment> = emptyList(), choices: List<Choice> = emptyList(), texts: Map<String, String> = emptyMap(), locations: List<Location> = emptyList(), metadata: Map<String, String> = emptyMap(), subElements: List<GenericElement> = emptyList(), connectorMessage: ConnectorMessage? = null)
val attachments: List<Attachment>
val choices: List<Choice>
val connectorType: ConnectorType
val locations: List<Location>
val metadata: Map<String, String>
val subElements: List<GenericElement>
val texts: Map<String, String>
data class Location : Message
interface Message
data class MessagesList
data class Sentence : Message
typealias SentenceElement = GenericMessage
typealias SentenceSubElement = GenericElement
package fr.vsct.tock.bot.engine.message.parser
package fr.vsct.tock.bot.engine.monitoring
package fr.vsct.tock.bot.engine.nlp
Module Contents
object BuiltInKeywordListener : NlpListener
data class NlpCallStats
interface NlpController
data class NlpEntityMergeContext
data class NlpIntentStat
interface NlpListener
Module Contents
open fun error(query: NlpQuery, throwable: Throwable?): Unit
open fun evaluateEntities(userTimeline: UserTimeline, dialog: Dialog, event: Event, nlpResult: NlpResult): List<EntityValue>
open fun findIntent(userTimeline: UserTimeline, dialog: Dialog, event: Event, nlpResult: NlpResult): IntentAware?
open fun handleKeyword(sentence: String): Intent?
open fun mergeEntityValues(dialogState: DialogState, action: Action, entityToMerge: NlpEntityMergeContext): NlpEntityMergeContext
open fun sortEntitiesToMerge(entities: List<NlpEntityMergeContext>): List<NlpEntityMergeContext>
open fun success(query: NlpQuery, result: NlpResult): Unit
package fr.vsct.tock.bot.engine.stt
package fr.vsct.tock.bot.engine.user
package fr.vsct.tock.bot.test
Module Contents
fun BotBusMockLog.alexa(): AlexaMessage?
open class BotBusMock : BotBus
Module Contents
BotBusMock(context: BotBusMockContext, action: Action = context.firstAction)
open val action: Action
fun addActionEntity(contextValue: EntityValue): BotBusMock
fun addActionEntity(entity: Entity, newValue: Value?): BotBusMock
fun addActionEntity(entity: Entity, textContent: String): BotBusMock
val answers: List<BotBusMockLog>
open val applicationId: String
fun applyBotAnswerInterceptor(a: Action): Action
open var botDefinition: BotDefinition
open val botId: PlayerId
val busAnswers: List<BotBusMockLog>
fun checkEndCalled(): BotBusMock
open var connectorData: ConnectorData
var connectorType: ConnectorType
val context: BotBusMockContext
fun createBotSentence(plainText: CharSequence?): SendSentence
open val currentAnswerIndex: Int
open var dialog: Dialog
open fun end(action: Action, delay: Long): BotBus
open val entities: Map<String, EntityStateValue>
val firstAnswer: BotBusMockLog
val firstBusAnswer: BotBusMockLog
open fun <T> getBusContextValue(name: String): T?
open var i18nProvider: I18nKeyProvider
open var intent: IntentAware?
val lastAnswer: BotBusMockLog
val lastBusAnswer: BotBusMockLog
open fun markAsUnknown(): Unit
open var nextUserActionState: NextUserActionState?
open fun reloadProfile(): Unit
fun run(): BotBusMock
val secondAnswer: BotBusMockLog
val secondBusAnswer: BotBusMockLog
open fun send(action: Action, delay: Long): BotBus
open fun sendAction(action: Action, delay: Long): Unit
open fun sendRawText(plainText: CharSequence?, delay: Long): BotBus
open fun setBusContextValue(key: String, value: Any?): Unit
open var story: Story
open var targetConnectorType: ConnectorType
val thirdAnswer: BotBusMockLog
val thirdBusAnswer: BotBusMockLog
open fun translate(key: I18nLabelValue?): CharSequence
val translator: TranslatorEngine
open val userId: PlayerId
open var userInterfaceType: UserInterfaceType
open val userLocale: Locale
open val userPreferences: UserPreferences
open var userTimeline: UserTimeline
open fun withMessage(connectorType: ConnectorType, messageProvider: () -> ConnectorMessage): BotBus
open fun withNotificationType(notificationType: ActionNotificationType): BotBus
open fun withPriority(priority: ActionPriority): BotBus
open fun withVisibility(visibility: ActionVisibility): BotBus
data class BotBusMockContext
Module Contents
BotBusMockContext(applicationId: String, userId: PlayerId, botId: PlayerId, botDefinition: BotDefinition, storyDefinition: StoryDefinition, action: Action = SendSentence(userId, applicationId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(), connectorType: ConnectorType = defaultTestConnectorType, testContext: TestContext = currentTestContext)
BotBusMockContext(botDefinition: BotDefinition, storyDefinition: StoryDefinition, applicationId: String = botDefinition.botId, userId: PlayerId = PlayerId("user"), botId: PlayerId = PlayerId("bot", PlayerType.bot), action: Action = SendSentence(userId, applicationId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(), connectorType: ConnectorType = defaultTestConnectorType, testContext: TestContext = currentTestContext)
BotBusMockContext(userTimeline: UserTimeline, dialog: Dialog, story: Story, firstAction: Action, botDefinition: BotDefinition, i18nProvider: I18nKeyProvider, userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, connectorType: ConnectorType = defaultTestConnectorType, testContext: TestContext = currentTestContext, snapshots: MutableList<Snapshot> = mutableListOf())
val answers: List<BotBusMockLog>
val applicationId: String
var botDefinition: BotDefinition
val botId: PlayerId
fun choice(intentName: String, vararg parameters: Pair<String, String>): SendChoice
fun choice(intentName: String, step: StoryStep<out StoryHandlerDefinition>, vararg parameters: Pair<String, String>): SendChoice
fun choice(intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>, parameters: Parameters): SendChoice
fun choice(intent: IntentAware, parameters: Parameters = Parameters()): SendChoice
fun choiceOfId(choiceId: String): SendChoice
var connectorType: ConnectorType
var dialog: Dialog
var firstAction: Action
val firstAnswer: BotBusMockLog
var i18nProvider: I18nKeyProvider
val initialUserPreferences: UserPreferences
val lastAnswer: BotBusMockLog
fun resetUserPreferences(userPreferences: UserPreferences): Unit
val secondAnswer: BotBusMockLog
fun sentence(text: String, vararg entityValues: EntityValue): SendSentence
fun sentence(text: String, entityValues: List<EntityValue> = emptyList()): SendSentence
fun sentence(text: String, intent: IntentAware? = null, vararg entityValues: EntityValue): SendSentence
fun sentence(text: String, intent: IntentAware? = null, entityValues: List<EntityValue> = emptyList()): SendSentence
fun sentence(message: ConnectorMessage, vararg entityValues: EntityValue): SendSentence
fun sentence(message: ConnectorMessage, entityValues: List<EntityValue> = emptyList()): SendSentence
fun sentence(message: ConnectorMessage, intent: IntentAware? = null, vararg entityValues: EntityValue): SendSentence
fun sentence(message: ConnectorMessage, intent: IntentAware? = null, entityValues: List<EntityValue> = emptyList()): SendSentence
val snapshots: MutableList<Snapshot>
var story: Story
val testContext: TestContext
val thirdAnswer: BotBusMockLog
val userId: PlayerId
var userInterfaceType: UserInterfaceType
val userPreferences: UserPreferences
var userTimeline: UserTimeline
data class BotBusMockLog
fun busMock(testContext: TestContext = currentTestContext): BotBusMock
var currentTestContext: TestContext
var defaultTestConnectorType: ConnectorType
fun BotBusMockLog.ga(): GAResponseConnectorMessage?
fun BotBusMockLog.messenger(): MessengerConnectorMessage?
fun mockMessenger(bus: BotBus): Unit
fun mockTockCommon(bus: BotBus): Unit
fun mockTwitter(: BotBus): Unit
fun BotDefinition.newBusMock(testContext: TestContext = currentTestContext, story: StoryDefinition = testContext.defaultStoryDefinition(this), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
fun BotDefinition.newBusMockContext(testContext: TestContext = currentTestContext, story: StoryDefinition = testContext.defaultStoryDefinition(this), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), action: Action = SendSentence(userId, this.botId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(locale = locale)): BotBusMockContext
fun BotBusMockLog.slack(): SlackConnectorMessage?
fun startBusMock(testContext: TestContext = currentTestContext): BotBusMock
fun BotDefinition.startNewBusMock(testContext: TestContext = currentTestContext, story: StoryDefinition = testContext.defaultStoryDefinition(this), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
fun StoryDefinitionBase.test(bus: BotBus): Unit
open class TestContext
open class TestLifecycle<out T : TestContext>
val testModules: MutableList<Module>
var testTranslatorModule: Module
fun BotBusMockLog.whatsapp(): WhatsAppBotMessage?
package fr.vsct.tock.bot.test.junit
Module Contents
open class TockJUnit4Rule<out T : TestContext>
Module Contents
TockJUnit4Rule(botDefinition: BotDefinition, lifecycle: TestLifecycle<T> = TestLifecycle(TestContext() as T))
open fun apply(base: <ERROR CLASS>, description: <ERROR CLASS>): <ERROR CLASS>
val botDefinition: BotDefinition
fun busMock(): BotBusMock
val lifecycle: TestLifecycle<T>
fun newBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
fun newBusMockContext(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMockContext
fun startBusMock(): BotBusMock
fun startNewBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
val testContext: T
open class TockJUnit5Extension : TockJUnit5ExtensionBase<TestContext>
open class TockJUnit5ExtensionBase<out T : TestContext>
Module Contents
TockJUnit5ExtensionBase(botDefinition: BotDefinition, lifecycle: TestLifecycle<T> = TestLifecycle(TestContext() as T))
open fun afterEach(p0: <ERROR CLASS>): Unit
open fun beforeEach(p0: <ERROR CLASS>): Unit
val botDefinition: BotDefinition
fun busMock(): BotBusMock
val lifecycle: TestLifecycle<T>
fun newBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
fun newBusMockContext(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), action: Action = SendSentence(userId, botDefinition.botId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(locale = locale)): BotBusMockContext
fun newChoiceRequest(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), parameters: Parameters, connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), tests: BotBusMock.() -> Unit): Unit
fun newRequest(text: String = "", intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), vararg entities: EntityValue, connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), tests: BotBusMock.() -> Unit): Unit
fun newRequest(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), actionProvider: () -> Action, tests: BotBusMock.() -> Unit): Unit
fun send(text: String = "", intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), vararg entities: EntityValue, connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), metadata: ActionMetadata = ActionMetadata(), tests: BotBusMock.() -> Unit): Unit
fun send(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), actionProvider: () -> Action, tests: BotBusMock.() -> Unit): Unit
fun sendChoice(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), parameters: Parameters = Parameters(), connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), tests: BotBusMock.() -> Unit): Unit
fun startBusMock(): BotBusMock
fun startNewBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
val testContext: T
package fr.vsct.tock.shared
Module Contents
fun basicAuthInterceptor(login: String, password: String): Interceptor
fun basicCredentialsHeader(: String, : String): String
fun booleanProperty(name: String, defaultValue: Boolean): Boolean
const val BUILTIN_ENTITY_EVALUATOR_NAMESPACE: String
fun checkMaxLengthAllowed(text: String): String
com.github.salomonbrys.kodein.KodeinInjector
com.mongodb.reactivestreams.client.MongoCollection
Module Contents
inline fun <reified T : Any> MongoCollection<T>.watch(fullDocument: FullDocument = FullDocument.DEFAULT, noinline listener: (ChangeStreamDocument<T>) -> Unit): Unit
fun concat(s1: String?, s2: String?): String
const val DEFAULT_APP_NAMESPACE: String
val defaultLocale: Locale
val defaultNamespace: String
val defaultZoneId: ZoneId
val devEnvironment: Boolean
object Dice
interface Executor
fun getAsyncDatabase(databaseNameProperty: String): MongoDatabase
fun getDatabase(databaseNameProperty: String): MongoDatabase
val injector: KodeinInjector
var internalDefaultZoneId: ZoneId
fun intProperty(name: String, defaultValue: Int): Int
java.util.Enumeration
kotlin.collections.Iterable
kotlin.collections.Iterator
kotlin.String
enum class Level
fun listProperty(name: String, defaultValue: List<String>, separator: String = ","): List<String>
object Loader
fun loadProperties(fileInClasspath: String): Properties
fun longProperty(name: String, defaultValue: Long): Long
fun mapListProperty(name: String, defaultValue: Map<String, List<String>>, entrySeparator: String = "|", keyValueSeparator: String = "=", listSeparator: String = ","): Map<String, List<String>>
fun <K, V> mapNotNullValues(vararg pairs: Pair<K, V?>): Map<K, V>
fun mapProperty(name: String, defaultValue: Map<String, String>, entrySeparator: String = "|", keyValueSeparator: String = "="): Map<String, String>
mu.KLogger
fun property(name: String, defaultValue: String): String
fun propertyExists(name: String): Boolean
fun resource(path: String): URL
fun resourceAsStream(path: String): InputStream
fun resourceAsString(path: String): String
retrofit2.Retrofit
retrofit2.Retrofit.Builder
fun retrofitBuilderWithTimeoutAndLogger(ms: Long, logger: KLogger = KotlinLogging.logger {}, level: Level = Level.BODY, interceptors: List<Interceptor> = emptyList(), requestGZipEncoding: Boolean = false, circuitBreaker: Boolean = false, proxy: Proxy? = null): Builder
val sharedModule: Module
@Target([AnnotationTarget.CLASS]) annotation class ThreadSafe
const val TOCK_NAMESPACE: String
var tockAppDefaultNamespace: String
var tockInternalInjector: KodeinInjector
fun tryToFindLocalIp(): String
package fr.vsct.tock.shared.cache
package fr.vsct.tock.shared.jackson
package fr.vsct.tock.shared.security
package fr.vsct.tock.shared.security.auth
package fr.vsct.tock.shared.vertx
Module Contents
class BadRequestException : RestException
var defaultVertxOptions: VertxOptions
io.vertx.core.Vertx
io.vertx.ext.web.Route
class NotFoundException : RestException
open class RestException : Exception
class UnauthorizedException : RestException
val vertx: Vertx
abstract class WebVerticle : AbstractVerticle
Module Contents
WebVerticle()
fun addAuth(authProvider: TockAuthProvider = defaultAuthProvider(), pathsToProtect: Set<String> = protectedPaths().map { "$it/*" }.toSet()): Unit
protected open fun addDevCorsHandler(): Unit
open val authenticatePath: String
protected open fun authProvider(): TockAuthProvider?
fun badRequest(message: String): Nothing
open val basePath: String
protected fun blocking(method: HttpMethod, path: String, role: TockUserRole? = defaultRole(), basePath: String = rootPath, handler: (RoutingContext) -> Unit): Unit
protected fun blockingDelete(path: String, role: TockUserRole? = defaultRole(), handler: (RoutingContext) -> Unit): Unit
protected fun blockingGet(path: String, role: TockUserRole? = defaultRole(), basePath: String = rootPath, handler: (RoutingContext) -> String): Unit
protected fun blockingJsonDelete(path: String, role: TockUserRole? = defaultRole(), handler: (RoutingContext) -> Boolean): Unit
protected fun <O> blockingJsonGet(path: String, role: TockUserRole? = defaultRole(), handler: (RoutingContext) -> O): Unit
protected inline fun <reified I : Any, O> blockingJsonPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, I) -> O): Unit
protected inline fun <reified I : Any, O> blockingJsonPut(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, I) -> O): Unit
protected fun blockingPost(path: String, role: TockUserRole? = defaultRole(), handler: (RoutingContext) -> Unit): Unit
protected inline fun <O> blockingUploadBinaryPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, Pair<String, ByteArray>) -> O): Unit
protected inline fun <reified F : Any, O> blockingUploadJsonPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, F) -> O): Unit
protected inline fun <O> blockingUploadPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, String) -> O): Unit
protected inline fun <reified I : Any, O> blockingWithBodyJson(method: HttpMethod, path: String, role: TockUserRole?, crossinline handler: (RoutingContext, I) -> O): Unit
protected fun bodyHandler(): BodyHandler
abstract fun configure(): Unit
protected fun corsHandler(origin: String = "*", allowCredentials: Boolean = false, allowedMethods: Set<HttpMethod> = EnumSet.of(GET, POST, PUT, DELETE), allowedHeaders: Set<String> = listOfNotNull(
"X-Requested-With",
"Access-Control-Allow-Origin",
if (allowCredentials) "Authorization" else null,
"Content-Type"
).toSet()): CorsHandler
protected open fun defaultAuthProvider(): TockAuthProvider
protected open fun defaultRole(): TockUserRole?
fun RoutingContext.endJson(success: Boolean): Unit
fun RoutingContext.endJson(result: Any?): Unit
fun HttpServerResponse.endJson(result: Any?): Unit
protected fun RoutingContext.executeBlocking(handler: (RoutingContext) -> Unit): Unit
fun RoutingContext.firstQueryParam(name: String): String?
abstract fun healthcheck(): (RoutingContext) -> Unit
open val healthcheckPath: String?
fun RoutingContext.isAuthorized(role: TockUserRole, resultHandler: (AsyncResult<Boolean>) -> Unit): Any
protected inline fun <reified I : Any, O> jsonPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, I, Handler<O>) -> Unit): Unit
protected open val logger: KLogger
open val logoutPath: String
fun notFound(): Nothing
val RoutingContext.organization: String
fun RoutingContext.path(name: String): String
fun <T> RoutingContext.pathId(name: String): Id<T>
fun RoutingContext.pathToLocale(name: String): Locale
protected open fun protectedPath(): String
protected open fun protectedPaths(): Set<String>
fun <T> RoutingContext.queryId(name: String): Id<T>?
fun readBytes(upload: FileUpload): ByteArray
inline fun <reified T : Any> RoutingContext.readJson(): T
inline fun <reified T : Any> readJson(upload: FileUpload): T
fun readString(upload: FileUpload): String
protected fun register(method: HttpMethod, path: String, role: TockUserRole? = defaultRole(), basePath: String = rootPath, handler: (RoutingContext) -> Unit): Unit
protected open val rootPath: String
val router: Router
protected val server: HttpServer
open fun start(startFuture: Future<Void>): Unit
protected open fun startServer(startFuture: Future<Void>): Unit
open fun stop(stopFuture: Future<Void>?): Unit
fun RoutingContext.success(): Unit
fun unauthorized(): Nothing
protected fun verticleBooleanProperty(propertyName: String, defaultValue: Boolean): Boolean
protected fun verticleIntProperty(propertyName: String, defaultValue: Int): Int
protected fun verticleLongProperty(propertyName: String, defaultValue: Long): Long
protected fun verticleProperty(propertyName: String, defaultValue: String): String
protected inline fun <reified I : Any, O> withBodyJson(method: HttpMethod, path: String, role: TockUserRole?, crossinline handler: (RoutingContext, I, Handler<O>) -> Unit): Unit